summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-12-30 15:20:19 -0500
committerEvan Prodromou <evan@prodromou.name>2008-12-30 15:20:19 -0500
commit9da3091b2efa9c3a6ff99891d75a416242475a5f (patch)
treed96275cdf95f154b5f25d3f2ebb7315eb6b9cbd3
parenta53860f6cf754f6b9ed33681de98740fa382a2e9 (diff)
Laconica-specific extensions for Twitter API
darcs-hash:20081230202019-84dde-0aab26044f990fc1039c669cd36860b5389fab64.gz
-rw-r--r--_darcs/inventory4
-rw-r--r--_darcs/patches/20081230202019-84dde-0aab26044f990fc1039c669cd36860b5389fab64.gzbin0 -> 1209 bytes
-rw-r--r--_darcs/pristine/actions/twitapilaconica.php111
-rw-r--r--_darcs/tentative_pristine117
-rw-r--r--actions/twitapilaconica.php111
5 files changed, 338 insertions, 5 deletions
diff --git a/_darcs/inventory b/_darcs/inventory
index 2bf89aeb6..7ea43f345 100644
--- a/_darcs/inventory
+++ b/_darcs/inventory
@@ -96,4 +96,6 @@ Evan Prodromou <evan@prodromou.name>**20081223194923
[Twitter-bridge: fix for Twitter's new strict policy of rejecting HTTP POSTs with invalid "expect" headers
Zach Copley <zach@controlyourself.ca>**20081225152207]
[whitespace changes in actions/register.php after global search-and-replace
-Evan Prodromou <evan@prodromou.name>**20081223195722] \ No newline at end of file
+Evan Prodromou <evan@prodromou.name>**20081223195722]
+[Laconica-specific extensions for Twitter API
+Evan Prodromou <evan@prodromou.name>**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 000000000..a2f4c4b2f
--- /dev/null
+++ b/_darcs/patches/20081230202019-84dde-0aab26044f990fc1039c669cd36860b5389fab64.gz
Binary files differ
diff --git a/_darcs/pristine/actions/twitapilaconica.php b/_darcs/pristine/actions/twitapilaconica.php
new file mode 100644
index 000000000..092f9e7d1
--- /dev/null
+++ b/_darcs/pristine/actions/twitapilaconica.php
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Laconica, the distributed open-source microblogging tool
+ *
+ * Laconica-only extensions to the Twitter-like API
+ *
+ * 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.
+ *
+ * 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/>.
+ *
+ * @category Twitter
+ * @package Laconica
+ * @author Evan Prodromou <evan@controlyourself.ca>
+ * @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 <evan@controlyourself.ca>
+ * @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 e2a840c37..2f7bfd6ba 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
++<?php
++/**
++ * Laconica, the distributed open-source microblogging tool
++ *
++ * Laconica-only extensions to the Twitter-like API
++ *
++ * 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.
++ *
++ * 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/>.
++ *
++ * @category Twitter
++ * @package Laconica
++ * @author Evan Prodromou <evan@controlyourself.ca>
++ * @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 <evan@controlyourself.ca>
++ * @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 000000000..092f9e7d1
--- /dev/null
+++ b/actions/twitapilaconica.php
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Laconica, the distributed open-source microblogging tool
+ *
+ * Laconica-only extensions to the Twitter-like API
+ *
+ * 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.
+ *
+ * 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/>.
+ *
+ * @category Twitter
+ * @package Laconica
+ * @author Evan Prodromou <evan@controlyourself.ca>
+ * @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 <evan@controlyourself.ca>
+ * @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);
+ }
+}