diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-08-27 22:55:32 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-08-27 22:55:32 -0400 |
commit | 6ff00c9404cb2b2dddcd12d63c497c85d9d087d8 (patch) | |
tree | 5b8f7a689407b03029347f112e5254753d6e44cc /lib/twitterapi.php | |
parent | bbb830e14c718c687f0636710a1827c90b11f4cc (diff) |
Implement the is_member and membership group api's
Diffstat (limited to 'lib/twitterapi.php')
-rw-r--r-- | lib/twitterapi.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php index c8099978f..638efba24 100644 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@ -791,6 +791,52 @@ class TwitterapiAction extends Action $this->end_document('xml'); } + function show_twitter_xml_users($user) + { + + $this->init_document('xml'); + $this->elementStart('users', array('type' => 'array')); + + if (is_array($user)) { + foreach ($group as $g) { + $twitter_user = $this->twitter_user_array($g); + $this->show_twitter_xml_user($twitter_user,'user'); + } + } else { + while ($user->fetch()) { + $twitter_user = $this->twitter_user_array($user); + $this->show_twitter_xml_user($twitter_user); + } + } + + $this->elementEnd('users'); + $this->end_document('xml'); + } + + function show_json_users($user) + { + + $this->init_document('json'); + + $users = array(); + + if (is_array($user)) { + foreach ($user as $u) { + $twitter_user = $this->twitter_user_array($u); + array_push($users, $twitter_user); + } + } else { + while ($user->fetch()) { + $twitter_user = $this->twitter_user_array($user); + array_push($users, $twitter_user); + } + } + + $this->show_json_objects($users); + + $this->end_document('json'); + } + function show_single_json_group($group) { $this->init_document('json'); |