summaryrefslogtreecommitdiff
path: root/lib/twitterapi.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-09-02 16:42:15 -0400
committerCraig Andrews <candrews@integralblue.com>2009-09-02 16:42:15 -0400
commita535ccdc4eba320ad88dc531329ae63c7f09c258 (patch)
treea8448dfe0b764818562ca9d04a39f04d4978dead /lib/twitterapi.php
parentf949c2c9d9afa63496f26b33d0309f8d06f77520 (diff)
parent0c95734a6874608ea5ed44608cabeda7c3a1b4ea (diff)
Merge remote branch 'laconica/0.8.x' into 0.9.x
Conflicts: lib/common.php lib/twitter.php
Diffstat (limited to 'lib/twitterapi.php')
-rw-r--r--lib/twitterapi.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index 4612f74e9..d199e4dee 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -788,6 +788,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');