Class Twitter::User
In: lib/twitter/extras.rb
lib/twitter/rails.rb
lib/twitter/model.rb
Parent: Object

Represents a Twitter user

Methods

attributes   bless   featured   find   friends   is_me?  

Included Modules

Twitter::RailsPatch ModelMixin

Public Class methods

Used as factory method callback

Provides access to the Featured Twitter API via the Twitter4R Model interface.

The following lines of code are equivalent to each other:

 users1 = Twitter::User.features(client)
 users2 = client.featured(:users)

where users1 and users2 would be logically equivalent.

Returns user model object with given id using the configuration and credentials of the client object passed in.

You can pass in either the user‘s unique integer ID or the user‘s screen name.

Public Instance methods

Override of ModelMixin#bless method.

Adds followers instance method when user object represents authenticated user. Otherwise just do basic bless.

This permits applications using Twitter4R to write Rubyish code like this:

 followers = user.followers if user.is_me?

Or:

 followers = user.followers if user.respond_to?(:followers)

Returns an Array of user objects that represents the authenticated user‘s friends on Twitter.

Returns whether this Twitter::User model object represents the authenticated user of the client that blessed it.

[Validate]