Commit bb08611d authored by Zach Copley's avatar Zach Copley

Delete action/api.php and rename lib/twitterapi.php to lib/api.php

parent 09f4d1ef
This diff is collapsed.
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Tests for the existence of friendship between two users. Will return true if
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/twitterapi.php';
require_once INSTALLDIR . '/lib/api.php';
/**
* Returns of the lastest 20 groups for the site
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/twitterapi.php';
require_once INSTALLDIR . '/lib/api.php';
/**
* List 20 newest members of the group specified by name or ID.
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Outputs detailed information about the group specified by ID
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/twitterapi.php';
require_once INSTALLDIR . '/lib/api.php';
/**
* Returns the string "ok" in the requested format with a 200 OK HTTP status code.
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Returns the notice specified by id as a Twitter-style status and inline user
......@@ -43,7 +43,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
* @link http://status.net/
*/
class ApiStatusesShowAction extends TwitterapiAction
class ApiStatusesShowAction extends ApiAction
{
var $notice_id = null;
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/twitterapi.php';
require_once INSTALLDIR . '/lib/api.php';
/**
* Gives a full dump of configuration variables for this instance
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/twitterapi.php';
require_once INSTALLDIR . '/lib/api.php';
/**
* Returns a version number for this version of StatusNet, which
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR . '/lib/twitterapi.php';
require_once INSTALLDIR . '/lib/api.php';
/**
* Returns the most recent notices (default 20) posted to the group specified by ID
......@@ -43,7 +43,7 @@ require_once INSTALLDIR . '/lib/twitterapi.php';
* @link http://status.net/
*/
class ApiTimelineGroupAction extends TwitterapiAction
class ApiTimelineGroupAction extends ApiAction
{
var $group = null;
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Returns the most recent notices (default 20) posted by everybody
......@@ -43,7 +43,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
* @link http://status.net/
*/
class ApiTimelinePublicAction extends TwitterapiAction
class ApiTimelinePublicAction extends ApiAction
{
var $notices = null;
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Returns the 20 most recent notices tagged by a given tag
......@@ -43,7 +43,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
* @link http://status.net/
*/
class ApiTimelineTagAction extends TwitterapiAction
class ApiTimelineTagAction extends ApiAction
{
var $notices = null;
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Ouputs information for a user, specified by ID or screen name.
......
<?php
/*
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2008, 2009, StatusNet, Inc.
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
require_once(INSTALLDIR.'/lib/twitterapi.php');
# This naming convention looks real sick
class TwitapinotificationsAction extends TwitterapiAction
{
function follow($args, $apidata)
{
parent::handle($args);
$this->serverError(_('API method under construction.'), $code=501);
}
function leave($args, $apidata)
{
parent::handle($args);
$this->serverError(_('API method under construction.'), $code=501);
}
}
\ No newline at end of file
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Action for outputting search results in Twitter compatible Atom
......@@ -46,10 +46,10 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*
* @see TwitterapiAction
* @see ApiAction
*/
class TwitapisearchatomAction extends TwitterapiAction
class TwitapisearchatomAction extends ApiAction
{
var $cnt;
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
require_once INSTALLDIR.'/lib/jsonsearchresultslist.php';
/**
......@@ -42,10 +42,10 @@ require_once INSTALLDIR.'/lib/jsonsearchresultslist.php';
* @author Zach Copley <zach@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
* @see TwitterapiAction
* @see ApiAction
*/
class TwitapisearchjsonAction extends TwitterapiAction
class TwitapisearchjsonAction extends ApiAction
{
var $query;
var $lang;
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Returns the top ten queries that are currently trending
......@@ -42,10 +42,10 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*
* @see TwitterapiAction
* @see ApiAction
*/
class TwitapitrendsAction extends TwitterapiAction
class TwitapitrendsAction extends ApiAction
{
var $callback;
......
<?php
/*
* StatusNet - the distributed open-source microblogging tool
* Copyright (C) 2008, 2009, StatusNet, Inc.
/**
* StatusNet, the distributed open-source microblogging tool
*
* Base API action
*
* This program is free software: you can redistribute it and/or modify
* PHP version 5
*
* LICENCE: This program 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 3 of the License, or
* (at your option) any later version.
......@@ -15,13 +18,30 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category API
* @package StatusNet
* @author Zach Copley <zach@status.net>
* @copyright 2009 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
if (!defined('STATUSNET')) {
exit(1);
}
class TwitterapiAction extends Action
/**
* Contains most of the Twitter-compatible API output functions.
*
* @category API
* @package StatusNet
* @author Zach Copley <zach@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
class ApiAction extends Action
{
/**
......
......@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/lib/twitterapi.php';
require_once INSTALLDIR.'/lib/api.php';
/**
* Actions extending this class will require auth
......@@ -43,7 +43,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
* @link http://status.net/
*/
class ApiAuthAction extends TwitterapiAction
class ApiAuthAction extends ApiAction
{
var $auth_user = null;
......
......@@ -242,7 +242,7 @@ class RealtimePlugin extends Plugin
// of refactoring from within a plugin, so I'm just abusing
// the TwitterApiAction method. Don't do this unless you're me!
require_once(INSTALLDIR.'/lib/twitterapi.php');
require_once(INSTALLDIR.'/lib/api.php');
$act = new TwitterApiAction('/dev/null');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment