Skip to content

Instantly share code, notes, and snippets.

@ayn
Created December 9, 2013 17:03
Show Gist options
  • Save ayn/7875918 to your computer and use it in GitHub Desktop.
Save ayn/7875918 to your computer and use it in GitHub Desktop.
Quick hack to pull photos from our wedding Eventstagram stream.
require "instagram"
tag = 'andrewandsherry'
Instagram.configure do |config|
config.client_id = ""
config.client_secret = ""
end
results = []
results += (page=Instagram.tag_recent_media tag)
while(!(max_id=page.pagination.next_max_id).nil?)
results += (page=Instagram.tag_recent_media('andrewandsherry', max_id: max_id))
end
results.each_with_index do |p, i|
system %Q{curl #{p.images.standard_resolution.url} -o Eventstagram\\ #{i+1}\\ by\\ \\@#{p.user.username}.jpg}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment