FediverseParser
class FediverseParser (View source)
Class to parse Fediverse files
Properties
| DoliDB | $db | ||
| string | $error |
Methods
__construct($platform)
Constructor
int
parser(string $urlAPI, int $maxNb = 5, int $cacheDelay = 60, string $cacheDir = '')
Parse Fediverse API to retrieve posts.
array<array{id: string, content: string, created_at: string, url: string, author_name: string, author_avatar?: string}|array{}>
getPosts()
Get the list of retrieved posts.
int|string
getLastFetchDate()
Get the last fetch date.
Details
__construct($platform)
Constructor
@param string $platform name of social network
int
parser(string $urlAPI, int $maxNb = 5, int $cacheDelay = 60, string $cacheDir = '')
Parse Fediverse API to retrieve posts.
array<array{id: string, content: string, created_at: string, url: string, author_name: string, author_avatar?: string}|array{}>
getPosts()
Get the list of retrieved posts.
int|string
getLastFetchDate()
Get the last fetch date.