Created
December 9, 2013 17:03
-
-
Save ayn/7875918 to your computer and use it in GitHub Desktop.
Quick hack to pull photos from our wedding Eventstagram stream.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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