diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-07-10 17:00:27 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-07-10 17:00:27 -0400 |
commit | 08d50655f3a220b1fe970b0917a6ecbcae019b04 (patch) | |
tree | 27bdaa7bdfd9274a2983bcc2b2d9796c92f1bff7 /lib/twitterapi.php | |
parent | bafa1ab1c532118e2230df50ed18a1b4573692b7 (diff) |
added group status api, located at /api/statuses/group_timeline/ID.rss
http://laconi.ca/trac/ticket/1702
Diffstat (limited to 'lib/twitterapi.php')
-rw-r--r-- | lib/twitterapi.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php index f48513e67..d2515070d 100644 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@ -774,6 +774,34 @@ class TwitterapiAction extends Action } } + function get_group($id, $apidata=null) + { + if (empty($id)) { + + if (is_numeric($this->arg('id'))) { + return User::staticGet($this->arg('id')); + } else if ($this->arg('id')) { + $nickname = common_canonical_nickname($this->arg('id')); + return User_group::staticGet('nickname', $nickname); + } else if ($this->arg('user_id')) { + // This is to ensure that a non-numeric user_id still + // overrides screen_name even if it doesn't get used + if (is_numeric($this->arg('user_id'))) { + return User_group::staticGet('id', $this->arg('user_id')); + } + } else if ($this->arg('screen_name')) { + $nickname = common_canonical_nickname($this->arg('screen_name')); + return User::staticGet('nickname', $nickname); + } + + } else if (is_numeric($id)) { + return User_group::staticGet($id); + } else { + $nickname = common_canonical_nickname($id); + return User_group::staticGet('nickname', $nickname); + } + } + function get_profile($id) { if (is_numeric($id)) { |