From a88770a26951e0fdbf00c18a2e25bf4e2dd60154 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 30 Dec 2008 15:25:13 -0500 Subject: add laconica-specific methods to htaccess.sample darcs-hash:20081230202513-84dde-47ab363eae62e1b9fc9280e579d348520c1233cc.gz --- _darcs/tentative_pristine | 117 ++-------------------------------------------- 1 file changed, 4 insertions(+), 113 deletions(-) (limited to '_darcs/tentative_pristine') diff --git a/_darcs/tentative_pristine b/_darcs/tentative_pristine index 2f7bfd6ba..cb9385eb9 100644 --- a/_darcs/tentative_pristine +++ b/_darcs/tentative_pristine @@ -1,113 +1,4 @@ -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); -+ } -+} +hunk ./htaccess.sample 146 ++RewriteRule ^api/laconica/version(.*)$ index.php?action=api&apiaction=laconica&method=version$1 [L,QSA] ++RewriteRule ^api/laconica/config(.*)$ index.php?action=api&apiaction=laconica&method=config$1 [L,QSA] ++RewriteRule ^api/laconica/wadl\.xml$ index.php?action=api&apiaction=laconica&method=wadl.xml [L,QSA] -- cgit v1.2.3-54-g00ecf