dolibarr 21.0.0-alpha
|
Class to manage Social network posts. More...
Public Member Functions | |
__construct ($platform, $authParams=[]) | |
Constructor. | |
fetchPosts ($urlAPI, $maxNb=5, $cacheDelay=60, $cacheDir='', $authParams=[]) | |
Fetch Social Network API to retrieve posts. | |
getPosts () | |
Get the list of retrieved posts. | |
getLastFetchDate () | |
Get the last fetch date. | |
Private Member Functions | |
initializeHandler ($authParams) | |
Initialize the social network needed. | |
Class to manage Social network posts.
Definition at line 31 of file socialnetworkmanager.class.php.
SocialNetworkManager::__construct | ( | $platform, | |
$authParams = [] ) |
Constructor.
string | $platform | name of social network |
array{username?:string,password?:string,name_app?:string,client_id?:string,client_secret?:string,redirect_uri?:string,access_token?:string} | $authParams other parameters |
Definition at line 64 of file socialnetworkmanager.class.php.
References initializeHandler().
SocialNetworkManager::fetchPosts | ( | $urlAPI, | |
$maxNb = 5, | |||
$cacheDelay = 60, | |||
$cacheDir = '', | |||
$authParams = [] ) |
Fetch Social Network API to retrieve posts.
string | $urlAPI | URL of the Fediverse API. |
int | $maxNb | Maximum number of posts to retrieve (default is 5). |
int | $cacheDelay | Number of seconds to use cached data (0 to disable caching). |
string | $cacheDir | Directory to store cached data. |
array{username?:string,password?:string,name_app?:string,client_id?:string,client_secret?:string,redirect_uri?:string,access_token?:string} | $authParams Authentication parameters |
Definition at line 95 of file socialnetworkmanager.class.php.
SocialNetworkManager::getLastFetchDate | ( | ) |
Get the last fetch date.
Definition at line 126 of file socialnetworkmanager.class.php.
SocialNetworkManager::getPosts | ( | ) |
Get the list of retrieved posts.
Definition at line 116 of file socialnetworkmanager.class.php.
|
private |
Initialize the social network needed.
array{username?:string,password?:string,name_app?:string,client_id?:string,client_secret?:string,redirect_uri?:string,access_token?:string} | $authParams other parameters |
Definition at line 75 of file socialnetworkmanager.class.php.
References dol_ucfirst().
Referenced by __construct().