Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

make tag_recent_media return pagination #74

Merged
merged 1 commit into from

3 participants

@alexcp

fix #64

This changes the return value of the tag_recent_media to be consistent with the current api and allow pagination.

The downside is that you now need to use the data attributes to access the array of data.

@marciok

Good job !

@heatonjb heatonjb merged commit a64c44e into from
@alexcp alexcp deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 23, 2013
  1. @alexcp
This page is out of date. Refresh to see the latest.
View
2  lib/instagram/client/tags.rb
@@ -34,7 +34,7 @@ def tag(tag, *args)
# @rate_limited true
def tag_recent_media(id, *args)
options = args.last.is_a?(Hash) ? args.pop : {}
- response = get("tags/#{id}/media/recent", options)
+ response = get("tags/#{id}/media/recent", options, false, false, true)
response
end
View
4 spec/instagram/client/tags_spec.rb
@@ -45,8 +45,8 @@
it "should return a list of media taken at a given location" do
media = @client.tag_recent_media('cat')
- media.should be_a Array
- media.first.user.username.should == "amandavan"
+ media.data.should be_a Array
+ media.data.first.user.username.should == "amandavan"
end
end
Something went wrong with that request. Please try again.