Created
November 20, 2014 01:49
-
-
Save tonyfast/3c121edc1121feae26ca to your computer and use it in GitHub Desktop.
Use Flickr API Explorer response to parse raw flickr image URLs
This file contains hidden or 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
| function url = flick_json2static( response ) | |
| % Convert flickr json app response into a static image url. | |
| % Go to flickr's app garden and generate a jsonified list of a photosets | |
| % contents. | |
| % | |
| % https://www.flickr.com/services/api/explore/flickr.photosets.getPhotos | |
| % | |
| % The id for the photoset can be found the url for the set. | |
| % | |
| % response is the contents of set.photoset.photo{%i} | |
| sz = 'z'; | |
| url = sprintf( 'https://farm%i.staticflickr.com/%s/%s_%s_%s.jpg', ... | |
| response.farm, response.server, response.id, response.secret, sz ) ; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment