diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-07-10 16:11:31 -0700 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-07-10 16:11:31 -0700 |
commit | 5b3d4f7121cf9999edb6789a9c0214dea193fe51 (patch) | |
tree | 78b4422b34fd8abf11155bbf6f616f7effe318f7 /lib/twitterapi.php | |
parent | 49e4f958eb7ff89bfb237da9bf810a0d668104e0 (diff) | |
parent | 08d50655f3a220b1fe970b0917a6ecbcae019b04 (diff) |
Merge branch 'candrews-review' into 0.8.x
* candrews-review:
added group status api, located at /api/statuses/group_timeline/ID.rss
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)) { |