25require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
26require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/class/socialnetworkmanager.class.php';
56 if (!empty($this->manager->error)) {
57 $this->error = $this->manager->error;
70 public function parser($urlAPI, $maxNb = 5, $cacheDelay = 60, $cacheDir =
'')
72 if (!$this->manager) {
76 $result = $this->manager->fetchPosts($urlAPI, $maxNb, $cacheDelay, $cacheDir);
77 if ($result ===
false) {
78 $this->error = $this->manager->error;
92 return $this->manager ? $this->manager->getPosts() : [];
102 return $this->manager ? $this->manager->getLastFetchDate() :
'';
Class to parse Fediverse files.
parser($urlAPI, $maxNb=5, $cacheDelay=60, $cacheDir='')
Parse Fediverse API to retrieve posts.
__construct($platform)
Constructor.
getPosts()
Get the list of retrieved posts.
getLastFetchDate()
Get the last fetch date.
Class to manage Social network posts.