diff --git a/QvitterPlugin.php b/QvitterPlugin.php index 56d3ce5..a115df8 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -77,16 +77,22 @@ class QvitterPlugin extends Plugin { $m->connect('api/statuses/public_and_external_timeline.:format', array('action' => 'ApiTimelinePublicAndExternal', 'format' => '(xml|json|rss|atom|as)')); - $m->connect('api/qvitter/update_link_color.json', array('action' => 'apiqvitterupdatelinkcolor')); - $m->connect('api/qvitter/update_background_color.json', array('action' => 'apiqvitterupdatebackgroundcolor')); - $m->connect('api/qvitter/checklogin.json', - array('action' => 'apiqvitterchecklogin')); - + array('action' => 'apiqvitterchecklogin')); + $m->connect('api/qvitter/statuses/friends_timeline.json', + array('action' => 'apiqvitterfriends')); + $m->connect('api/qvitter/statuses/friends_timeline/:id.json', + array('action' => 'apiqvitterfriends', + 'id' => Nickname::INPUT_FMT)); + $m->connect('api/qvitter/statuses/mentions/:id.json', + array('action' => 'apiqvittermentions', + 'id' => Nickname::INPUT_FMT)); + $m->connect('api/qvitter/statuses/mentions.:format', + array('action' => 'apiqvittermentions')); $m->connect('settings/qvitter', array('action' => 'qvittersettings')); $m->connect('main/qlogin', diff --git a/actions/apiqvitterfriends.php b/actions/apiqvitterfriends.php new file mode 100644 index 0000000..37ee411 --- /dev/null +++ b/actions/apiqvitterfriends.php @@ -0,0 +1,46 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiQvitterFriendsAction extends ApiTimelineFriendsAction +{ + function showTimeline() + { + ApiQvitterAction::showQvitterJsonTimeline($this->notices); + } +} + + diff --git a/actions/apiqvittermentions.php b/actions/apiqvittermentions.php new file mode 100644 index 0000000..e9b4685 --- /dev/null +++ b/actions/apiqvittermentions.php @@ -0,0 +1,44 @@ + \\\\_\ · + · \\) \____) · + · · + · · + · · + · Qvitter is free software: you can redistribute it and / or modify it · + · under the terms of the GNU Affero General Public License as published by · + · the Free Software Foundation, either version three of the License or (at · + · your option) any later version. · + · · + · Qvitter is distributed in hope that it will be useful but WITHOUT ANY · + · WARRANTY; without even the implied warranty of MERCHANTABILTY or FITNESS · + · FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for · + · more details. · + · · + · You should have received a copy of the GNU Affero General Public License · + · along with Qvitter. If not, see . · + · · + · Contact h@nnesmannerhe.im if you have any questions. · + · · + · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · */ + +if (!defined('GNUSOCIAL')) { exit(1); } + +class ApiQvitterMentionsAction extends ApiTimelineMentionsAction +{ + function showTimeline() + { + ApiQvitterAction::showQvitterJsonTimeline($this->notices); + } +} \ No newline at end of file diff --git a/actions/apitimelinepublicandexternal.php b/actions/apitimelinepublicandexternal.php index 8ab9643..da7efd9 100644 --- a/actions/apitimelinepublicandexternal.php +++ b/actions/apitimelinepublicandexternal.php @@ -230,7 +230,7 @@ class ApiTimelinePublicAndExternalAction extends ApiPrivateAuthAction break; case 'json': - $this->showJsonTimeline($this->notices); + ApiQvitterAction::showQvitterJsonTimeline($this->notices); break; case 'as': header('Content-Type: ' . ActivityStreamJSONDocument::CONTENT_TYPE); diff --git a/actions/qvitter.php b/actions/qvitter.php index 4d06d4d..7f3cfea 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -322,8 +322,8 @@ class QvitterAction extends ApiAction