diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-03-06 13:33:47 -0800 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-03-06 13:33:47 -0800 |
commit | b1f337fe018dd3910c68589a98b0242470743a4c (patch) | |
tree | 6e6faed106cec74535ace6f00b3e2499e8cb5e99 /lib/twitterapi.php | |
parent | 87e5badcb6e8d89e2c85e2bf4be3748b8cd5f940 (diff) |
First crack at Twitter-like JSON search results for the API
Diffstat (limited to 'lib/twitterapi.php')
-rw-r--r-- | lib/twitterapi.php | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php index 74f265cbb..1de169a0b 100644 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@ -24,11 +24,33 @@ class TwitterapiAction extends Action var $auth_user; + /** + * Initialization. + * + * @param array $args Web and URL arguments + * + * @return boolean false if user doesn't exist + */ + + function prepare($args) + { + parent::prepare($args); + return true; + } + + /** + * Handle a request + * + * @param array $args Arguments from $_REQUEST + * + * @return void + */ + function handle($args) { parent::handle($args); } - + function twitter_user_array($profile, $get_notice=false) { @@ -86,7 +108,7 @@ class TwitterapiAction extends Action ($replier_profile) ? $replier_profile->nickname : null; if (isset($this->auth_user)) { - $twitter_status['favorited'] = + $twitter_status['favorited'] = ($this->auth_user->hasFave($notice)) ? 'true' : 'false'; } else { $twitter_status['favorited'] = 'false'; @@ -399,7 +421,7 @@ class TwitterapiAction extends Action $t = strtotime($dt); return date("D M d G:i:s O Y", $t); } - + // XXX: Candidate for a general utility method somewhere? function count_subscriptions($profile) { |