Feed
extends Base
in package
Table of Contents
Properties
Methods
- fromObj() : self
- fromReq() : Feed
- Build feed from TikTok response
- toJson() : string
- Converts item into a JSON string
- _buildUserInfoList() : array<string|int, mixed>
- setItems() : mixed
- setMeta() : mixed
- setNav() : mixed
Properties
$cursor
public
int
$cursor
= 0
$hasMore
public
bool
$hasMore
= false
$items
public
array<string|int, mixed>
$items
= []
$meta
public
Meta
$meta
Methods
fromObj()
public
static fromObj(object $cache) : self
Parameters
- $cache : object
Return values
selffromReq()
Build feed from TikTok response
public
static fromReq(Response $req) : Feed
Parameters
- $req : Response
-
TikTok response
Return values
FeedtoJson()
Converts item into a JSON string
public
toJson([bool $pretty_print = false ]) : string
Parameters
- $pretty_print : bool = false
-
Use pretty print
Return values
string_buildUserInfoList()
private
static _buildUserInfoList(object $data) : array<string|int, mixed>
Parameters
- $data : object
Return values
array<string|int, mixed>setItems()
private
setItems(array<string|int, mixed> $items) : mixed
Parameters
- $items : array<string|int, mixed>
setMeta()
private
setMeta(Response $res) : mixed
Parameters
- $res : Response
setNav()
private
setNav(bool $hasMore, int $cursor) : mixed
Parameters
- $hasMore : bool
- $cursor : int