summaryrefslogtreecommitdiff
path: root/actions/twitapihelp.php
diff options
context:
space:
mode:
authorzach <zach@copley.name>2008-07-20 04:34:28 -0400
committerzach <zach@copley.name>2008-07-20 04:34:28 -0400
commit93ac0bcae3a600733045ad7a5bafabcdfd49d9e5 (patch)
tree83a507b0a1b8dfa9d739b1ecff675ffea995eb76 /actions/twitapihelp.php
parent140689800b03ff704f6c70260c2b740ad41578c0 (diff)
Twitter-compatible API - refactoring and bug fixes
darcs-hash:20080720083428-ca946-c14a92345366f2105b3c452a3899714d89692daa.gz
Diffstat (limited to 'actions/twitapihelp.php')
-rw-r--r--actions/twitapihelp.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/actions/twitapihelp.php b/actions/twitapihelp.php
index 5a35d8442..9701913f1 100644
--- a/actions/twitapihelp.php
+++ b/actions/twitapihelp.php
@@ -30,13 +30,15 @@ class TwitapihelpAction extends TwitterapiAction {
function test($args, $apidata) {
global $xw;
if ($apidata['content-type'] == 'xml') {
- header('Content-Type: application/xml; charset=utf-8');
+ $this->init_document('xml');
common_start_xml();
common_element('ok', NULL, 'true');
common_end_xml();
+ $this->end_document('xml');
} elseif ($apidata['content-type'] == 'json') {
- header('Content-Type: application/json; charset=utf-8');
+ $this->init_document('json');
print '"ok"';
+ $this->end_document('json');
} else {
common_user_error("API method not found!", $code=404);
}