Searching Flickr

Let’s begin with the Flickr side of things. To search Flickr, you call the flickr.photos.search method. Here is what a GET request to search for the text cat looks like:

    https://api.flickr.com/services/rest/?method=flickr.photos.search
    &api_key=xxx&format=json&nojsoncallback=1&extras=url_s&safe_search=1&text=cat

The method is set to flickr.photos.search. The text parameter is set to whatever string you are searching for (cat, in this case). Setting safesearch to 1 filters potentially offensive results from the search data sent back.

Some of the parameter-value pairs, such as format=json, are constant across both the flickr.photos.search and flickr.interestingness.getList request URLs. You are going to abstract ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.