From 9da3091b2efa9c3a6ff99891d75a416242475a5f Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 30 Dec 2008 15:20:19 -0500 Subject: [PATCH] Laconica-specific extensions for Twitter API darcs-hash:20081230202019-84dde-0aab26044f990fc1039c669cd36860b5389fab64.gz --- _darcs/inventory | 4 +- ...aab26044f990fc1039c669cd36860b5389fab64.gz | Bin 0 -> 1209 bytes _darcs/pristine/actions/twitapilaconica.php | 111 +++++++++++++++++ _darcs/tentative_pristine | 117 +++++++++++++++++- actions/twitapilaconica.php | 111 +++++++++++++++++ 5 files changed, 338 insertions(+), 5 deletions(-) create mode 100644 _darcs/patches/20081230202019-84dde-0aab26044f990fc1039c669cd36860b5389fab64.gz create mode 100644 _darcs/pristine/actions/twitapilaconica.php create mode 100644 actions/twitapilaconica.php diff --git a/_darcs/inventory b/_darcs/inventory index 2bf89aeb65..7ea43f3453 100644 --- a/_darcs/inventory +++ b/_darcs/inventory @@ -96,4 +96,6 @@ Evan Prodromou **20081223194923 [Twitter-bridge: fix for Twitter's new strict policy of rejecting HTTP POSTs with invalid "expect" headers Zach Copley **20081225152207] [whitespace changes in actions/register.php after global search-and-replace -Evan Prodromou **20081223195722] \ No newline at end of file +Evan Prodromou **20081223195722] +[Laconica-specific extensions for Twitter API +Evan Prodromou **20081230202019] \ No newline at end of file diff --git a/_darcs/patches/20081230202019-84dde-0aab26044f990fc1039c669cd36860b5389fab64.gz b/_darcs/patches/20081230202019-84dde-0aab26044f990fc1039c669cd36860b5389fab64.gz new file mode 100644 index 0000000000000000000000000000000000000000..a2f4c4b2fb18b19a2d5ce9b38e39f4a23bd0e284 GIT binary patch literal 1209 zcmV;q1V;NGiwFP!000001MOCAZ{kJ}{?4zMN|gcuOkQ+SOQQ5#@`gkS0-`9Ys%Wvt zc$M|8ySs)%RsMTt*EW#LHNAd2o$5%DS^UUls`}>GRO7e(xO^y*ycm(*#qBLAd z1BucwUvq0wLpT{Wu2xLKM5|bqMzc|}=@9?nEhC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m+e^tOgPI_pP-~@|PtAkf zd8%eI@lUg?@Vf^Gtqy!RI<9eE>hSh^;j*9xpwf|J!k2|+W!y}2wx9$2hKw7U5w3bP z2nEFNJMVggQ&fypXAASHSu!pQv*+gLZbk*9nQJgAG`E|sac9ob?$C5spDj{OhhnXC zY+Bz{=aiIw!;SM0UXJKiVIs}_jjO&ed`U#=rg_K5T^Uw9_SeEUx>DYEDlMsQiQiSV X*DMy_Os!uUFO9zeHQxk=hz$S$$pui6 literal 0 HcmV?d00001 diff --git a/_darcs/pristine/actions/twitapilaconica.php b/_darcs/pristine/actions/twitapilaconica.php new file mode 100644 index 0000000000..092f9e7d13 --- /dev/null +++ b/_darcs/pristine/actions/twitapilaconica.php @@ -0,0 +1,111 @@ +. + * + * @category Twitter + * @package Laconica + * @author Evan Prodromou + * @copyright 2008 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +if (!defined('LACONICA')) { + exit(1); +} + +require_once INSTALLDIR.'/lib/twitterapi.php'; + +/** + * Laconica-specific API methods + * + * This class handles all /laconica/ API methods. + * + * @category Twitter + * @package Laconica + * @author Evan Prodromou + * @copyright 2008 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +class TwitapilaconicaAction extends TwitterapiAction +{ + /** + * A version stamp for the API + * + * Returns a version number for this version of Laconica, which + * should make things a bit easier for upgrades. + * + * @param array $args Web arguments + * @param array $apidata Twitter API data + * + * @return void + * + * @see ApiAction::process_command() + */ + + function version($args, $apidata) + { + parent::handle($args); + common_server_error(_('API method under construction.'), 501); + } + + /** + * Dump of configuration variables + * + * Gives a full dump of configuration variables for this instance + * of Laconica, minus variables that may be security-sensitive (like + * passwords). + * + * @param array $args Web arguments + * @param array $apidata Twitter API data + * + * @return void + * + * @see ApiAction::process_command() + */ + + function config($args, $apidata) + { + parent::handle($args); + common_server_error(_('API method under construction.'), 501); + } + + /** + * WADL description of the API + * + * Gives a WADL description of the API provided by this version of the + * software. + * + * @param array $args Web arguments + * @param array $apidata Twitter API data + * + * @return void + * + * @see ApiAction::process_command() + */ + + function wadl($args, $apidata) + { + parent::handle($args); + common_server_error(_('API method under construction.'), 501); + } +} diff --git a/_darcs/tentative_pristine b/_darcs/tentative_pristine index e2a840c37c..2f7bfd6ba2 100644 --- a/_darcs/tentative_pristine +++ b/_darcs/tentative_pristine @@ -1,4 +1,113 @@ -hunk ./actions/register.php 24 -- -hunk ./actions/register.php 41 -- +addfile ./actions/twitapilaconica.php +hunk ./actions/twitapilaconica.php 1 ++. ++ * ++ * @category Twitter ++ * @package Laconica ++ * @author Evan Prodromou ++ * @copyright 2008 Control Yourself, Inc. ++ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 ++ * @link http://laconi.ca/ ++ */ ++ ++if (!defined('LACONICA')) { ++ exit(1); ++} ++ ++require_once INSTALLDIR.'/lib/twitterapi.php'; ++ ++/** ++ * Laconica-specific API methods ++ * ++ * This class handles all /laconica/ API methods. ++ * ++ * @category Twitter ++ * @package Laconica ++ * @author Evan Prodromou ++ * @copyright 2008 Control Yourself, Inc. ++ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 ++ * @link http://laconi.ca/ ++ */ ++ ++class TwitapilaconicaAction extends TwitterapiAction ++{ ++ /** ++ * A version stamp for the API ++ * ++ * Returns a version number for this version of Laconica, which ++ * should make things a bit easier for upgrades. ++ * ++ * @param array $args Web arguments ++ * @param array $apidata Twitter API data ++ * ++ * @return void ++ * ++ * @see ApiAction::process_command() ++ */ ++ ++ function version($args, $apidata) ++ { ++ parent::handle($args); ++ common_server_error(_('API method under construction.'), 501); ++ } ++ ++ /** ++ * Dump of configuration variables ++ * ++ * Gives a full dump of configuration variables for this instance ++ * of Laconica, minus variables that may be security-sensitive (like ++ * passwords). ++ * ++ * @param array $args Web arguments ++ * @param array $apidata Twitter API data ++ * ++ * @return void ++ * ++ * @see ApiAction::process_command() ++ */ ++ ++ function config($args, $apidata) ++ { ++ parent::handle($args); ++ common_server_error(_('API method under construction.'), 501); ++ } ++ ++ /** ++ * WADL description of the API ++ * ++ * Gives a WADL description of the API provided by this version of the ++ * software. ++ * ++ * @param array $args Web arguments ++ * @param array $apidata Twitter API data ++ * ++ * @return void ++ * ++ * @see ApiAction::process_command() ++ */ ++ ++ function wadl($args, $apidata) ++ { ++ parent::handle($args); ++ common_server_error(_('API method under construction.'), 501); ++ } ++} diff --git a/actions/twitapilaconica.php b/actions/twitapilaconica.php new file mode 100644 index 0000000000..092f9e7d13 --- /dev/null +++ b/actions/twitapilaconica.php @@ -0,0 +1,111 @@ +. + * + * @category Twitter + * @package Laconica + * @author Evan Prodromou + * @copyright 2008 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +if (!defined('LACONICA')) { + exit(1); +} + +require_once INSTALLDIR.'/lib/twitterapi.php'; + +/** + * Laconica-specific API methods + * + * This class handles all /laconica/ API methods. + * + * @category Twitter + * @package Laconica + * @author Evan Prodromou + * @copyright 2008 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +class TwitapilaconicaAction extends TwitterapiAction +{ + /** + * A version stamp for the API + * + * Returns a version number for this version of Laconica, which + * should make things a bit easier for upgrades. + * + * @param array $args Web arguments + * @param array $apidata Twitter API data + * + * @return void + * + * @see ApiAction::process_command() + */ + + function version($args, $apidata) + { + parent::handle($args); + common_server_error(_('API method under construction.'), 501); + } + + /** + * Dump of configuration variables + * + * Gives a full dump of configuration variables for this instance + * of Laconica, minus variables that may be security-sensitive (like + * passwords). + * + * @param array $args Web arguments + * @param array $apidata Twitter API data + * + * @return void + * + * @see ApiAction::process_command() + */ + + function config($args, $apidata) + { + parent::handle($args); + common_server_error(_('API method under construction.'), 501); + } + + /** + * WADL description of the API + * + * Gives a WADL description of the API provided by this version of the + * software. + * + * @param array $args Web arguments + * @param array $apidata Twitter API data + * + * @return void + * + * @see ApiAction::process_command() + */ + + function wadl($args, $apidata) + { + parent::handle($args); + common_server_error(_('API method under construction.'), 501); + } +}