Documentation

Feed extends Base
in package

Table of Contents

Properties

$cursor  : int
$hasMore  : bool
$items  : array<string|int, mixed>
$meta  : Meta

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 = []

Methods

fromObj()

public static fromObj(object $cache) : self
Parameters
$cache : object
Return values
self

fromReq()

Build feed from TikTok response

public static fromReq(Response $req) : Feed
Parameters
$req : Response

TikTok response

Return values
Feed

toJson()

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>

setNav()

private setNav(bool $hasMore, int $cursor) : mixed
Parameters
$hasMore : bool
$cursor : int

        
On this page

Search results