use Friendica\Network\HTTPException;
use Friendica\Security\BasicAuth;
use Friendica\Security\OAuth;
-use Friendica\Util\Arrays;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\HTTPInputData;
-use Friendica\Util\XML;
-
-require_once __DIR__ . '/../../include/api.php';
class BaseApi extends BaseModule
{
*/
protected static $request = [];
- public static function delete()
+ public function delete()
{
self::checkAllowedScope(self::SCOPE_WRITE);
}
}
- public static function patch()
+ public function patch()
{
self::checkAllowedScope(self::SCOPE_WRITE);
}
}
- public static function post()
+ public function post()
{
self::checkAllowedScope(self::SCOPE_WRITE);
}
}
- public static function put()
+ public function put()
{
self::checkAllowedScope(self::SCOPE_WRITE);
}
}
}
-
- /**
- * Get user info array.
- *
- * @param int|string $contact_id Contact ID or URL
- * @return array|bool
- * @throws HTTPException\BadRequestException
- * @throws HTTPException\InternalServerErrorException
- * @throws HTTPException\UnauthorizedException
- * @throws \ImagickException
- */
- protected static function getUser($contact_id = null)
- {
- return api_get_user($contact_id);
- }
}