Documentation

Hashtag extends Base
in package

Basic class for all available data from TikTok

Table of Contents

Properties

$caching_mode  : CachingMode
Enable caching for Item
$cursor  : mixed
$feed  : Feed
$info  : Info
$sender  : Sender
$term  : string
$cache  : Cache
$type  : string

Methods

__construct()  : mixed
__destruct()  : mixed
Destruct function, handles cache
error()  : Meta
Get Meta from feed if $this->feed has been called, info if not
feed()  : self
feedOk()  : bool
Checks if feed request went ok
getFeed()  : Feed|null
Returns feed, returns null if $this->feed has not been called
getFull()  : Full
getInfo()  : Info
info()  : self
infoOk()  : bool
Checks if info request went OK
ok()  : bool
Checks if both info and feed requests went ok
handleFeedCache()  : bool
Checks if cache exists and sets the value of `$this->feed`
getCacheKey()  : string
Builds cache key from type (video, tag...) and key (id of user, hashtag name...)

Properties

$caching_mode

Enable caching for Item

protected CachingMode $caching_mode = \TikScraper\Constants\CachingMode::FULL

$cursor

protected mixed $cursor

$term

protected string $term

$type

private string $type

Methods

__destruct()

Destruct function, handles cache

public __destruct() : mixed

error()

Get Meta from feed if $this->feed has been called, info if not

public error() : Meta
Return values
Meta

feed()

public feed([int $cursor = 0 ]) : self
Parameters
$cursor : int = 0
Return values
self

feedOk()

Checks if feed request went ok

public feedOk() : bool
Return values
bool

getFeed()

Returns feed, returns null if $this->feed has not been called

public getFeed() : Feed|null
Return values
Feed|null

info()

public info() : self
Return values
self

infoOk()

Checks if info request went OK

public infoOk() : bool
Return values
bool

ok()

Checks if both info and feed requests went ok

public ok() : bool
Return values
bool

handleFeedCache()

Checks if cache exists and sets the value of `$this->feed`

protected handleFeedCache() : bool
Return values
bool

Exists?

getCacheKey()

Builds cache key from type (video, tag...) and key (id of user, hashtag name...)

private getCacheKey([bool $addCursor = false ]) : string
Parameters
$addCursor : bool = false

Add current cursor to key

Return values
string

        
On this page

Search results