mirror of
https://github.com/friendica/friendica
synced 2025-04-22 08:30:10 +00:00
Add custom emojis Mastodon API endpoint
This commit is contained in:
parent
1ac9107e5f
commit
bd910342df
7 changed files with 114 additions and 30 deletions
28
src/Module/Api/Mastodon/CustomEmojis.php
Normal file
28
src/Module/Api/Mastodon/CustomEmojis.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\Content\Smilies;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
||||
/**
|
||||
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests
|
||||
*/
|
||||
class CustomEmojis extends BaseApi
|
||||
{
|
||||
/**
|
||||
* @param array $parameters
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests#pending-follows
|
||||
*/
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
$emojis = DI::mstdnEmoji()->createCollectionFromSmilies(Smilies::getList());
|
||||
|
||||
System::jsonExit($emojis->getArrayCopy());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue