]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Twitter/Statuses/NetworkPublicTimeline.php
Reenable Twitter/Destroy tests
[friendica.git] / src / Module / Api / Twitter / Statuses / NetworkPublicTimeline.php
index f1da6d2f6072ccd7e28afc24985796208f0da05a..1ec00acf25afaaa9921d845fe905ee39b6930065 100644 (file)
@@ -33,17 +33,17 @@ use Friendica\Model\Post;
  */
 class NetworkPublicTimeline extends BaseApi
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
                BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
                $uid = BaseApi::getCurrentUserID();
 
                $since_id = $_REQUEST['since_id'] ?? 0;
-               $max_id   = $_REQUEST['max_id'] ?? 0;
+               $max_id   = $_REQUEST['max_id']   ?? 0;
 
                // pagination
                $count = $_REQUEST['count'] ?? 20;
-               $page  = $_REQUEST['page'] ?? 1;
+               $page  = $_REQUEST['page']  ?? 1;
 
                $start = max(0, ($page - 1) * $count);
 
@@ -55,7 +55,7 @@ class NetworkPublicTimeline extends BaseApi
                        $condition[] = $max_id;
                }
 
-               $params = ['order' => ['id' => true], 'limit' => [$start, $count]];
+               $params   = ['order' => ['id' => true], 'limit' => [$start, $count]];
                $statuses = Post::selectForUser($uid, Item::DISPLAY_FIELDLIST, $condition, $params);
 
                $include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true');
@@ -66,6 +66,6 @@ class NetworkPublicTimeline extends BaseApi
                }
                DBA::close($statuses);
 
-               DI::apiResponse()->exit('statuses', ['status' => $ret], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid));
+               $this->response->exit('statuses', ['status' => $ret], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid));
        }
 }