From: Hypolite Petovan Date: Thu, 5 Dec 2019 13:11:32 +0000 (-0500) Subject: Add Mastodon API entity classes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2e9be55e51640810674c9311e8988a99aefa466a;p=friendica.git Add Mastodon API entity classes --- diff --git a/src/Api/Mastodon/Account.php b/src/Api/Mastodon/Account.php new file mode 100644 index 0000000000..5d4f369155 --- /dev/null +++ b/src/Api/Mastodon/Account.php @@ -0,0 +1,86 @@ +id = $contact['id']; + $account->username = $contact['nick']; + $account->acct = $contact['nick']; + $account->display_name = $contact['name']; + $account->locked = $contact['blocked']; + $account->created_at = DateTimeFormat::utc($contact['created'], DateTimeFormat::ATOM); + // No data is available from contact + $account->followers_count = 0; + $account->following_count = 0; + $account->statuses_count = 0; + $account->note = BBCode::convert($contact['about']); + $account->url = $contact['url']; + $account->avatar = $contact['avatar']; + $account->avatar_static = $contact['avatar']; + // No header picture in Friendica + $account->header = ''; + $account->header_static = ''; + // No custom emojis per account in Friendica + $account->emojis = []; + + return $account; + } +} diff --git a/src/Api/Mastodon/Emoji.php b/src/Api/Mastodon/Emoji.php new file mode 100644 index 0000000000..0fda2d12cb --- /dev/null +++ b/src/Api/Mastodon/Emoji.php @@ -0,0 +1,20 @@ +