24require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
25require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
26require_once DOL_DOCUMENT_ROOT.
'/core/class/socialnetworkmanager.class.php';
55 if (!empty($this->manager->error)) {
56 $this->error = $this->manager->error;
69 public function parser($urlAPI, $maxNb = 5, $cacheDelay = 60, $cacheDir =
'')
71 if (!$this->manager) {
75 $result = $this->manager->fetchPosts($urlAPI, $maxNb, $cacheDelay, $cacheDir);
76 if ($result ===
false) {
77 $this->error = $this->manager->error;
91 return $this->manager ? $this->manager->getPosts() : [];
101 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.