Module: Twitter::AuthenticatedUserMixin::InstanceMethods
- Defined in:
- lib/vendor/twitter/lib/twitter/model.rb
Instance Method Summary collapse
-
#befriend(user) ⇒ Object
Adds given user as a friend.
-
#defriend(user) ⇒ Object
Removes given user as a friend.
-
#followers(options = {}) ⇒ Object
Returns an Array of user objects that represents the authenticated user’s friends on Twitter.
Instance Method Details
#befriend(user) ⇒ Object
Adds given user as a friend. Returns user object as given by Twitter
REST server response.
For user
argument you may pass in the unique integer user ID, screen name or Twitter::User object representation.
143 144 145 |
# File 'lib/vendor/twitter/lib/twitter/model.rb', line 143 def befriend(user) @client.friend(:add, user) end |
#defriend(user) ⇒ Object
Removes given user as a friend. Returns user object as given by Twitter
REST server response.
For user
argument you may pass in the unique integer user ID, screen name or Twitter::User object representation.
152 153 154 |
# File 'lib/vendor/twitter/lib/twitter/model.rb', line 152 def defriend(user) @client.friend(:remove, user) end |
#followers(options = {}) ⇒ Object
Returns an Array of user objects that represents the authenticated user’s friends on Twitter.
134 135 136 |
# File 'lib/vendor/twitter/lib/twitter/model.rb', line 134 def followers( = {}) @client.my(:followers, ) end |