DiasporaHandler
class DiasporaHandler (View source)
Class for handling Diaspora API interactions
Properties
| string | $error |
Methods
bool
fetch(string $urlAPI, int $maxNb = 5, int $cacheDelay = 60, string $cacheDir = '', array<string, string> $authParams = [])
Fetch Social Network API to retrieve posts.
array{}|array{id: string, content: string, created_at: string, url: string, author_name: string, author_avatar: string}
normalizeData(array<string, mixed> $postData)
Normalize data of retrieved 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.
Details
bool
fetch(string $urlAPI, int $maxNb = 5, int $cacheDelay = 60, string $cacheDir = '', array<string, string> $authParams = [])
Fetch Social Network API to retrieve posts.
array{}|array{id: string, content: string, created_at: string, url: string, author_name: string, author_avatar: string}
normalizeData(array<string, mixed> $postData)
Normalize data of retrieved 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.