\Vigas\StreamingPlatforms\ModelPlatformAccount

Class PlatformAccount.

Gets and manage account from streaming platform, interact with database

Summary

Methods
Properties
Constants
curlRequest()
cryptToken()
decryptToken()
__construct()
getPlatform()
getUsername()
getToken()
getProfilPictureUrl()
setToken()
No public properties found
No constants found
No protected methods found
$platform
$username
$token
$profil_picture_url
N/A
No private methods found
No private properties found
N/A

Properties

$platform

$platform : object

Type

object — The streaming platform

$username

$username : string

Type

string — The streaming platform account username

$token

$token : string

Type

string — The authentication token given by the streaming platform

$profil_picture_url

$profil_picture_url : string

Type

string — The the streaming platform profil picture URL

Methods

curlRequest()

curlRequest(string  $url, string|null  $post_data = null, string|null  $http_header = null) : string

Parameters

string $url

URL to send the request to

string|null $post_data

POST data to send

string|null $http_header

HTTP header to set

Returns

string —

Returns http(s) response

cryptToken()

cryptToken(string  $token) : string

Crypt a token

Parameters

string $token

Token to crypt

Returns

string —

The crypted token

decryptToken()

decryptToken(string  $encrypted_token) : string

Decrypt a token

Parameters

string $encrypted_token

The crypted token

Returns

string —

The decrypted token

__construct()

__construct(string  $platform) 

Parameters

string $platform

The streaming platform

getPlatform()

getPlatform() : object

Returns

object —

Returns the streaming platform

getUsername()

getUsername() : string

Returns

string —

Returns the streaming platform account username

getToken()

getToken() : string

Returns

string —

Returns the authentication token given by the streaming platform

getProfilPictureUrl()

getProfilPictureUrl() : string

Returns

string —

Returns the streaming platform profil picture URL

setToken()

setToken(string  $token) 

Parameters

string $token

The authentication token given by the streaming platform