Search code examples
flickr

Access Sets using name (Flickr)


I am using flicker API to show pictures on my website and everything is working fine for me. however i am struck at one place and seems like not able to find solution for this.

My website is related to travelling and i need to show images related to destinations on destination specific page.

for e.g if i have a destination with name "Delhi" , i need to show images under the set "Delhi" and same applies to other destinations also.

Though i can make use of the "set-id" to fetch images but that means i need to take care of set-ids in all cases.

I was thinking , if it is possible to fetch sets bases on there name rather than the id, say for Delhi , all i need to pass Delhi to API and i should be able to fetch images tagged under set Delhi?

Is this possible or is there any alternate to achieve this?


Solution

  • It is possible. You can use the API call: flickr.photos.search

    Return a list of photos matching some criteria. Only photos visible to the calling user will be returned. To return private or semi-private photos, the caller must be authenticated with 'read' permissions, and have permission to view the photos. Unauthenticated calls will only return public photos.

    Just use a specific tag for each location and then just search with the desired tag and show the pictures.