Documentation

Twitter extends Base
in package

Class Twitter.

Table of Contents

ALLOWED_TYPE_OF_LOG  = ['info', 'warning', 'error']
Allowed type of log.
TWEET_MODE  = 'extended'
Tweet mode.
$logOn  : bool
Turn on/off logs.
$socialMediaType  : string
Social media type.
$twitterConnection  : TwitterOAuth
Object TwitterOAuth.
$userName  : string
User account name.
__construct()  : mixed
Twitter constructor.
getQueryList()  : Query
Get query for list records.
isActive()  : bool
Is configured.
isExists()  : bool
Check if the current user exists.
isUserExists()  : bool
Check if the user exists.
log()  : mixed
Log to db.
logError()  : mixed
Log error.
logInfo()  : mixed
Log info.
logWarning()  : mixed
Log warning.
remove()  : mixed
Remove social media account from database.
removeMass()  : mixed
Remove mass twitter records from DB.
retrieveDataFromApi()  : mixed
Retrieve data from Api.
getFromApi()  : mixed
Make GET requests to the API.
getTwitterConnection()  : TwitterOAuth
Get Twitter connection object.
logErrorDb()  : mixed
Log error.
logInfoDb()  : mixed
Log info.

Constants

ALLOWED_TYPE_OF_LOG

Allowed type of log.

public mixed ALLOWED_TYPE_OF_LOG = ['info', 'warning', 'error']

Properties

$logOn

Turn on/off logs.

public static bool $logOn = true

$socialMediaType

Social media type.

protected static string $socialMediaType = 'twitter'

$twitterConnection

Object TwitterOAuth.

private static TwitterOAuth $twitterConnection = null

$userName

User account name.

private string $userName

Methods

__construct()

Twitter constructor.

public __construct(string $userName) : mixed
Parameters
$userName : string
Tags
throws
AppException
Return values
mixed

getQueryList()

Get query for list records.

public static getQueryList(string|array<string|int, string> $twitterLogin) : Query
Parameters
$twitterLogin : string|array<string|int, string>
Return values
Query

isActive()

Is configured.

public static isActive() : bool
Tags
throws
AppException
Return values
bool

isExists()

Check if the current user exists.

public isExists() : bool
Return values
bool

isUserExists()

Check if the user exists.

public static isUserExists(string $userName) : bool
Parameters
$userName : string
Return values
bool

log()

Log to db.

public static log(string $typeOfLog, string $message) : mixed
Parameters
$typeOfLog : string
$message : string
Tags
throws
AppException
throws
Exception
Return values
mixed

logError()

Log error.

public static logError(string $message) : mixed
Parameters
$message : string
Tags
throws
AppException
throws
Exception
Return values
mixed

logInfo()

Log info.

public static logInfo(string $message) : mixed
Parameters
$message : string
Tags
throws
AppException
throws
Exception
Return values
mixed

logWarning()

Log warning.

public static logWarning(string $message) : mixed
Parameters
$message : string
Tags
throws
AppException
throws
Exception
Return values
mixed

remove()

Remove social media account from database.

public remove() : mixed
Return values
mixed

removeMass()

Remove mass twitter records from DB.

public static removeMass(array<string|int, string> $logins) : mixed
Parameters
$logins : array<string|int, string>
Tags
throws
Exception
Return values
mixed

retrieveDataFromApi()

Retrieve data from Api.

public retrieveDataFromApi() : mixed
Return values
mixed

getFromApi()

Make GET requests to the API.

private getFromApi(string $path[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$path : string
$parameters : array<string|int, mixed> = []
Tags
throws
AppException
Return values
mixed

getTwitterConnection()

Get Twitter connection object.

private static getTwitterConnection() : TwitterOAuth
Return values
TwitterOAuth

logErrorDb()

Log error.

private logErrorDb(string $message) : mixed
Parameters
$message : string
Tags
throws
AppException
throws
Exception
Return values
mixed

logInfoDb()

Log info.

private logInfoDb(string $message) : mixed
Parameters
$message : string
Tags
throws
AppException
throws
Exception
Return values
mixed

Search results