Module: Croudia::Rest::FriendShips
- Included in:
- Client
- Defined in:
- lib/croudia/rest/friend_ships.rb
Instance Method Summary collapse
-
#follow(params = {}) ⇒ Croudia::Object::User
Allows the authenticating users to follow the user specified in the ID parameter.
-
#relationship(params = {}) ⇒ Croudia::Object::Relationship
Returns detailed information about the relationship between two arbitrary users.
-
#relationships(params = {}) ⇒ Croudia::Object::RelationshipCollection
Returns the relationships of the authenticating user to the comma-separated list of up to 100 screen_names or user_ids provided.
-
#unfollow(params = {}) ⇒ Croudia::Object::User
Allows the authenticating user to unfollow the user specified in the ID parameter.
Instance Method Details
#follow(params = {}) ⇒ Croudia::Object::User
Allows the authenticating users to follow the user specified in the ID parameter.
16 17 18 19 |
# File 'lib/croudia/rest/friend_ships.rb', line 16 def follow(params = {}) response = post('friendships/create.json', params) Croudia::Object::User.new(response) end |
#relationship(params = {}) ⇒ Croudia::Object::Relationship
Returns detailed information about the relationship between two arbitrary users.
42 43 44 45 |
# File 'lib/croudia/rest/friend_ships.rb', line 42 def relationship(params = {}) response = get('friendships/show.json', params) Croudia::Object::Relationship.new(response) end |
#relationships(params = {}) ⇒ Croudia::Object::RelationshipCollection
Returns the relationships of the authenticating user to the comma-separated list of up to 100 screen_names or user_ids provided.
54 55 56 57 |
# File 'lib/croudia/rest/friend_ships.rb', line 54 def relationships(params = {}) response = get('friendships/lookup.json', params) Croudia::Object::RelationshipCollection.new(response) end |
#unfollow(params = {}) ⇒ Croudia::Object::User
Allows the authenticating user to unfollow the user specified in the ID parameter.
28 29 30 31 |
# File 'lib/croudia/rest/friend_ships.rb', line 28 def unfollow(params = {}) response = post('friendships/destroy.json', params) Croudia::Object::User.new(response) end |