Class: Instagram::Client
- Inherits:
-
API
- Object
- API
- Instagram::Client
- Defined in:
- lib/instagram/client.rb,
lib/instagram/client/tags.rb,
lib/instagram/client/likes.rb,
lib/instagram/client/media.rb,
lib/instagram/client/users.rb,
lib/instagram/client/utils.rb,
lib/instagram/client/comments.rb,
lib/instagram/client/locations.rb,
lib/instagram/client/real_time.rb,
lib/instagram/client/subscriptions.rb
Overview
All methods have been separated into modules and follow the same grouping used in the Instagram API Documentation.
Wrapper for the Instagram REST API
Defined Under Namespace
Modules: Comments, Likes, Locations, Media, RealTime, Subscriptions, Tags, Users
Instance Method Summary collapse
-
#user_followed_by(*args) ⇒ Object
Returns a list of users whom a given user is followed by.
-
#user_media_feed(options = {}) ⇒ Array
Returns the 20 most recent media items from the currently authorized user's feed.
-
#user_recent_media(*args) ⇒ Object
Returns a list of recent media items for a given user.
-
#user_requested_by ⇒ Object
Returns a list of users whom a given user is followed by.
Methods included from Subscriptions
#create_subscription, #delete_subscription, #process_subscription, #subscriptions
Methods included from Likes
#like_media, #media_likes, #unlike_media
Methods included from Comments
#create_media_comment, #delete_media_comment, #media_comments
Methods included from Tags
#tag, #tag_recent_media, #tag_search
Methods included from Locations
#location, #location_recent_media, #location_search
Methods included from Media
#media_item, #media_popular, #media_search
Methods included from Users
#user, #user_follows, #user_search
Methods included from OAuth
#authorize_url, #get_access_token
Methods included from Request
Instance Method Details
#user_followed_by(id = nil, options = {}) ⇒ Hashie::Mash #user_followed_by(id = nil, options = {}) ⇒ Hashie::Mash
Returns a list of users whom a given user is followed by
91 92 93 94 95 96 |
# File 'lib/instagram/client/users.rb', line 91 def user_followed_by(*args) = args.last.is_a?(Hash) ? args.pop : {} id = args.first || "self" response = get("users/#{id}/followed-by", ) response["data"] end |
#user_media_feed(options = {}) ⇒ Array
Returns the 20 most recent media items from the currently authorized user's feed.
131 132 133 134 135 |
# File 'lib/instagram/client/users.rb', line 131 def user_media_feed(*args) = args.first.is_a?(Hash) ? args.pop : {} response = get('users/self/feed', ) response["data"] end |
#user_recent_media(id = nil, options = {}) ⇒ Hashie::Mash #user_recent_media(id = nil, options = {}) ⇒ Hashie::Mash
Returns a list of recent media items for a given user
158 159 160 161 162 163 |
# File 'lib/instagram/client/users.rb', line 158 def user_recent_media(*args) = args.last.is_a?(Hash) ? args.pop : {} id = args.first || "self" response = get("users/#{id}/media/recent", ) response["data"] end |
#user_requested_by ⇒ Hashie::Mash #user_requested_by ⇒ Hashie::Mash
Returns a list of users whom a given user is followed by
113 114 115 116 |
# File 'lib/instagram/client/users.rb', line 113 def user_requested_by() response = get("users/self/requested-by") response["data"] end |