Sender
in package
Centralized class for handling TikTok requests
Table of Contents
Constants
Properties
Methods
- __construct() : mixed
- sendApi() : Response
- Send request to TikTok's internal API
- sendHTML() : Response
- Send regular HTML request using Guzzle
Constants
API_URL
private
mixed
API_URL
= self::WEB_URL . "/api"
WEB_URL
private
mixed
WEB_URL
= "https://www.tiktok.com"
Properties
$guzzle
private
Guzzle
$guzzle
$selenium
private
Selenium
$selenium
$tokens
private
Tokens
$tokens
Methods
__construct()
public
__construct(array<string|int, mixed> $config) : mixed
Parameters
- $config : array<string|int, mixed>
sendApi()
Send request to TikTok's internal API
public
sendApi(string $endpoint[, array<string|int, mixed> $query = [] ][, string $referrer = "/" ]) : Response
Parameters
- $endpoint : string
-
Api endpoint
- $query : array<string|int, mixed> = []
-
Custom query to be sent, later to me merged with some default values
- $referrer : string = "/"
-
Custom
Referrer
to be sent
Return values
ResponsesendHTML()
Send regular HTML request using Guzzle
public
sendHTML(string $endpoint, string $subdomain) : Response
Parameters
- $endpoint : string
-
HTML endpoint
- $subdomain : string
-
Subdomain to be used