]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseApi.php
Merge remote-tracking branch 'upstream/develop' into api4
[friendica.git] / src / Module / BaseApi.php
index a0a94c336f0cf8e9b83bc848f0cdc2b0ec83acf8..a34f25f938726bf87bf5f2c9fc9a21810521fee4 100644 (file)
@@ -29,12 +29,8 @@ use Friendica\Model\Post;
 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
 {
@@ -53,7 +49,7 @@ class BaseApi extends BaseModule
         */
        protected static $request = [];
 
-       public static function delete(array $parameters = [])
+       public function delete()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -62,7 +58,7 @@ class BaseApi extends BaseModule
                }
        }
 
-       public static function patch(array $parameters = [])
+       public function patch()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -71,7 +67,7 @@ class BaseApi extends BaseModule
                }
        }
 
-       public static function post(array $parameters = [])
+       public function post()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -80,7 +76,7 @@ class BaseApi extends BaseModule
                }
        }
 
-       public static function put(array $parameters = [])
+       public function put()
        {
                self::checkAllowedScope(self::SCOPE_WRITE);
 
@@ -139,7 +135,6 @@ class BaseApi extends BaseModule
         * Set boundaries for the "link" header
         * @param array $boundaries
         * @param int $id
-        * @return array
         */
        protected static function setBoundaries(int $id)
        {
@@ -295,19 +290,4 @@ class BaseApi extends BaseModule
                        }
                }
        }
-
-       /**
-        * 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);
-       }
 }