dolibarr 21.0.0-alpha
|
Class for handler Mastodon. More...
Public Member Functions | |
__construct ($authParams) | |
Constructor to set the necessary credentials. | |
normalizeData ($postData) | |
Normalize data of retrieved posts. | |
getPosts () | |
Get the list of retrieved posts. | |
getRedirectUri () | |
Getter for url to redirect. | |
getAccessToken () | |
Getter for access token. | |
getClientId () | |
Getter for client Id. | |
getClientSecret () | |
Getter for secret client. | |
Private Member Functions | |
formatDate ($dateString) | |
Format date for normalize date. | |
Class for handler Mastodon.
Definition at line 32 of file mastodonhandler.class.php.
MastodonHandler::__construct | ( | $authParams | ) |
Constructor to set the necessary credentials.
array{client_id?:string,client_secret?:string,redirect_uri?:string,access_token?:string} | $authParams parameters for authentication |
Definition at line 70 of file mastodonhandler.class.php.
|
private |
Format date for normalize date.
string | $dateString | date with string format |
Definition at line 179 of file mastodonhandler.class.php.
References dol_print_date().
Referenced by normalizeData().
MastodonHandler::getAccessToken | ( | ) |
Getter for access token.
Definition at line 208 of file mastodonhandler.class.php.
MastodonHandler::getClientId | ( | ) |
Getter for client Id.
Definition at line 217 of file mastodonhandler.class.php.
MastodonHandler::getClientSecret | ( | ) |
Getter for secret client.
Definition at line 226 of file mastodonhandler.class.php.
MastodonHandler::getPosts | ( | ) |
Get the list of retrieved posts.
Definition at line 190 of file mastodonhandler.class.php.
MastodonHandler::getRedirectUri | ( | ) |
Getter for url to redirect.
Definition at line 199 of file mastodonhandler.class.php.
MastodonHandler::normalizeData | ( | $postData | ) |
Normalize data of retrieved posts.
array{content?:string,created_at?:string,url?:string,media_attachments?:array<array{url:string}>} | $postData post retrieved |
Definition at line 160 of file mastodonhandler.class.php.
References formatDate().