mirror of
https://github.com/friendica/friendica
synced 2025-04-24 12:30:10 +00:00
Make BaseModule methods dynamic
This commit is contained in:
parent
714f0febc4
commit
489cd0884a
253 changed files with 397 additions and 385 deletions
|
@ -35,7 +35,7 @@ class Accounts extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Block extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ class FeaturedTags extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Follow extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Followers extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Following extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ class IdentityProofs extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Lists extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Mute extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Note extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Relationships extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -37,7 +37,7 @@ class Search extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -39,7 +39,7 @@ class Statuses extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unblock extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unfollow extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unmute extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Util\HTTPInputData;
|
|||
*/
|
||||
class UpdateCredentials extends BaseApi
|
||||
{
|
||||
public static function patch()
|
||||
public function patch()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,7 +35,7 @@ class VerifyCredentials extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ class Announcements extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Apps extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
$request = self::getRequest([
|
||||
'client_name' => '',
|
||||
|
|
|
@ -30,7 +30,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class VerifyCredentials extends BaseApi
|
||||
{
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$application = self::getCurrentApplication();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Blocks extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -36,7 +36,7 @@ class Bookmarks extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Conversations extends BaseApi
|
||||
{
|
||||
public static function delete()
|
||||
public function delete()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -49,7 +49,7 @@ class Conversations extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Read extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -37,7 +37,7 @@ class CustomEmojis extends BaseApi
|
|||
* @throws \ImagickException
|
||||
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests#pending-follows
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$emojis = DI::mstdnEmoji()->createCollectionFromSmilies(Smilies::getList());
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class Directory extends BaseApi
|
|||
* @throws \ImagickException
|
||||
* @see https://docs.joinmastodon.org/methods/instance/directory/
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$request = self::getRequest([
|
||||
'offset' => 0, // How many accounts to skip before returning results. Default 0.
|
||||
|
|
|
@ -32,7 +32,7 @@ class Endorsements extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
System::jsonExit([]);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class Favourited extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Filters extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
|
@ -41,7 +41,7 @@ class Filters extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class FollowRequests extends BaseApi
|
|||
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests#accept-follow
|
||||
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests#reject-follow
|
||||
*/
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_FOLLOW);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -82,7 +82,7 @@ class FollowRequests extends BaseApi
|
|||
* @throws \ImagickException
|
||||
* @see https://docs.joinmastodon.org/methods/accounts/follow_requests/
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -33,7 +33,7 @@ class Instance extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
System::jsonExit(InstanceEntity::get());
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class Peers extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$return = [];
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class Rules extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$rules = [];
|
||||
$id = 0;
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Model\Group;
|
|||
*/
|
||||
class Lists extends BaseApi
|
||||
{
|
||||
public static function delete()
|
||||
public function delete()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -51,7 +51,7 @@ class Lists extends BaseApi
|
|||
System::jsonExit([]);
|
||||
}
|
||||
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -74,7 +74,7 @@ class Lists extends BaseApi
|
|||
System::jsonExit(DI::mstdnList()->createFromGroupId($id));
|
||||
}
|
||||
|
||||
public static function put()
|
||||
public function put()
|
||||
{
|
||||
$request = self::getRequest([
|
||||
'title' => '', // The title of the list to be updated.
|
||||
|
@ -91,7 +91,7 @@ class Lists extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,12 +35,12 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Accounts extends BaseApi
|
||||
{
|
||||
public static function delete()
|
||||
public function delete()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::DELETE);
|
||||
}
|
||||
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::POST);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class Accounts extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -31,7 +31,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Markers extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
|
@ -41,7 +41,7 @@ class Markers extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Media extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -53,7 +53,7 @@ class Media extends BaseApi
|
|||
System::jsonExit(DI::mstdnAttachment()->createFromPhoto($media['id']));
|
||||
}
|
||||
|
||||
public static function put()
|
||||
public function put()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -82,7 +82,7 @@ class Media extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Mutes extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -40,7 +40,7 @@ class Notifications extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -30,7 +30,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Clear extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Network\HTTPException\ForbiddenException;
|
|||
*/
|
||||
class Dismiss extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Preferences extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ class Proofs extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
System::jsonError(404, ['error' => 'Record not found']);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ use Friendica\Object\Api\Mastodon\Notification;
|
|||
*/
|
||||
class PushSubscription extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_PUSH);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -66,7 +66,7 @@ class PushSubscription extends BaseApi
|
|||
return DI::mstdnSubscription()->createForApplicationIdAndUserId($application['id'], $uid)->toArray();
|
||||
}
|
||||
|
||||
public static function put()
|
||||
public function put()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_PUSH);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -99,7 +99,7 @@ class PushSubscription extends BaseApi
|
|||
return DI::mstdnSubscription()->createForApplicationIdAndUserId($application['id'], $uid)->toArray();
|
||||
}
|
||||
|
||||
public static function delete()
|
||||
public function delete()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_PUSH);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -112,7 +112,7 @@ class PushSubscription extends BaseApi
|
|||
System::jsonExit([]);
|
||||
}
|
||||
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_PUSH);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class ScheduledStatuses extends BaseApi
|
||||
{
|
||||
public static function put()
|
||||
public function put()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -42,7 +42,7 @@ class ScheduledStatuses extends BaseApi
|
|||
DI::apiResponse()->unsupported(Router::PUT);
|
||||
}
|
||||
|
||||
public static function delete()
|
||||
public function delete()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -63,7 +63,7 @@ class ScheduledStatuses extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -40,7 +40,7 @@ class Search extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -41,7 +41,7 @@ use Friendica\Util\Images;
|
|||
*/
|
||||
class Statuses extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -207,7 +207,7 @@ class Statuses extends BaseApi
|
|||
DI::mstdnError()->InternalError();
|
||||
}
|
||||
|
||||
public static function delete()
|
||||
public function delete()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
@ -231,7 +231,7 @@ class Statuses extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Bookmark extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,7 +35,7 @@ class Card extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Context extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Favourite extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,7 +35,7 @@ class FavouritedBy extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Mute extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Pin extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,7 +35,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Reblog extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,7 +35,7 @@ class RebloggedBy extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unbookmark extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -33,7 +33,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unfavourite extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unmute extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -32,7 +32,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unpin extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,7 +35,7 @@ use Friendica\Module\BaseApi;
|
|||
*/
|
||||
class Unreblog extends BaseApi
|
||||
{
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Suggestions extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -35,7 +35,7 @@ class Direct extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -36,7 +36,7 @@ class Home extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -36,7 +36,7 @@ class ListTimeline extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -39,7 +39,7 @@ class PublicTimeline extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class Tag extends BaseApi
|
|||
/**
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
self::checkAllowedScope(self::SCOPE_READ);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
|
|
@ -34,7 +34,7 @@ class Trends extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
$request = self::getRequest([
|
||||
'limit' => 20, // Maximum number of results to return. Defaults to 10.
|
||||
|
|
|
@ -33,7 +33,7 @@ class Unimplemented extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function delete()
|
||||
public function delete()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::DELETE);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class Unimplemented extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function patch()
|
||||
public function patch()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::PATCH);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ class Unimplemented extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function post()
|
||||
public function post()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::POST);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class Unimplemented extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function put()
|
||||
public function put()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::PUT);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class Unimplemented extends BaseApi
|
|||
/**
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent()
|
||||
public function rawContent()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::GET);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue