Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
incomplete Twitter::User object in certain cases.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
trustfundbaby  
View profile  
 More options Dec 10 2008, 2:47 am
From: trustfundbaby <ikecof...@gmail.com>
Date: Tue, 9 Dec 2008 23:47:43 -0800 (PST)
Local: Wed, Dec 10 2008 2:47 am
Subject: incomplete Twitter::User object in certain cases.
This one is a bit odd, so hopefully someone knows why this is.
But if you use the  user(twitter_id) call, you get back a
Twitter::User Object.

Some users will have all the attributes present,
but some others will always be missing ...
@friends_count, @profile_text_color, @statuses_count,
@profile_sidebar_border_color, @profile_background, @favourites_count,
@profile_sidebar_fill_color, @description, @profile_image_url,
@profile_link_color

Is there a reason why this is?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Nunemaker  
View profile  
 More options Dec 10 2008, 3:23 pm
From: John Nunemaker <nunema...@gmail.com>
Date: Wed, 10 Dec 2008 15:23:58 -0500
Local: Wed, Dec 10 2008 3:23 pm
Subject: Re: incomplete Twitter::User object in certain cases.
Certain API calls return more information than others. The user class  
handles all the possible data but you are correct in that all data is  
not returned with each call.

On Dec 10, 2008, at 2:47 AM, trustfundbaby <ikecof...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
trustfundbaby  
View profile  
 More options Dec 10 2008, 11:02 pm
From: trustfundbaby <ikecof...@gmail.com>
Date: Wed, 10 Dec 2008 20:02:27 -0800 (PST)
Local: Wed, Dec 10 2008 11:02 pm
Subject: Re: incomplete Twitter::User object in certain cases.
But here's the thing.
Its the same call ....
Why does it return different data for some users than others?

On Dec 10, 2:23 pm, John Nunemaker <nunema...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Nunemaker  
View profile  
 More options Dec 10 2008, 11:55 pm
From: John Nunemaker <nunema...@gmail.com>
Date: Wed, 10 Dec 2008 23:55:04 -0500
Local: Wed, Dec 10 2008 11:55 pm
Subject: Re: incomplete Twitter::User object in certain cases.
Maybe some users are private? I don't know. You probably would have to  
ask on the twitter api mailing list.

On Dec 10, 2008, at 11:02 PM, trustfundbaby wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
trustfundbaby  
View profile  
 More options Dec 11 2008, 4:03 am
From: trustfundbaby <ikecof...@gmail.com>
Date: Thu, 11 Dec 2008 01:03:32 -0800 (PST)
Local: Thurs, Dec 11 2008 4:03 am
Subject: Re: incomplete Twitter::User object in certain cases.
I took a look at the api call for users, and it returns a very
standard xml format (excluding those attributes listed in my original
message).

Just go to this url (replace 'user_name' with real twitter names to
see what I mean)
http://twitter.com/users/show/user_name.xml

So I started looking into base.rb of the twitter gem and noticed that
the user call
\ruby\lib\ruby\gems\1.8\gems\twitter-0.3.7\lib\twitter

    # returns all the profile information and the last status for a
user
    def user(id_or_screenname)
      users(request("users/show/#{id_or_screenname}.xml", :auth =>
true)).first
    end

references the private call users

      # Converts an hpricot doc to an array of users
      def users(doc)
        (doc/:user).inject([]) { |users, user| users <<
User.new_from_xml(user); users }
      end

So I followed it further and looked up user.rb
and thats where I saw where it says exactly what I wrote in my
original posting

line 21
# optional, not always present
then it lists those attributes I listed above.

My question is, why are those attributes not always present ...
And I'm a little confused because in looking at that initial url
http://twitter.com/users/show/user_name.xml

I have not come across an instance where those attributes were
present.

On Dec 10, 10:55 pm, John Nunemaker <nunema...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
trustfundbaby  
View profile  
 More options Dec 11 2008, 4:06 am
From: trustfundbaby <ikecof...@gmail.com>
Date: Thu, 11 Dec 2008 01:06:57 -0800 (PST)
Local: Thurs, Dec 11 2008 4:06 am
Subject: Re: incomplete Twitter::User object in certain cases.
And the users aren't private either.

On Dec 11, 3:03 am, trustfundbaby <ikecof...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Nunemaker  
View profile  
 More options Dec 11 2008, 10:40 am
From: John Nunemaker <nunema...@gmail.com>
Date: Thu, 11 Dec 2008 10:40:48 -0500
Local: Thurs, Dec 11 2008 10:40 am
Subject: Re: incomplete Twitter::User object in certain cases.
Because users get parsed in lots of places. Each status has a user for  
example. The user xml that is with a status does not match the users/
show/ xml or at least it didn't at one time. /users/show is not the  
only place where the xml for a user is presented, thus I have to allow  
for handling the different information you can get in different api  
calls other than /users/show.

On Dec 11, 2008, at 4:03 AM, trustfundbaby wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »