flickr api: how to know which albums the image belong to - flickr

I am getting a list of photos using
https://api.flickr.com/services/rest/?method=flickr.photos.search
It gives a json with an array of photos.
I also want to know to which albume each photo belong to (if at all)
Because when i open https://www.flickr.com/photos/147875968#N08/44811952245/in/photostream/#hare it shows This photo is in 1 album and says Yellow Cat
Similary is there any way to know which albums this photo is in

I believe that you can use flickr.photos.getAllContexts to find the photosets to which a photo belongs.

Related

How to know if a Google Photos album has changed

I'm using Google Photos API to access albums.
Users can have in an album anything from a single photo to thousands of photos.
Is there a way to get something like an ETag to know if an album has changed since a previous known state?
Currently, the only way I could find is to iterate over all the images, and having to do that in 100 photos each time can take a lot of calls just to find out at the end that nothing has changed.
You want to know whether the album of Google Photos has been changed.
I could understand like above. Unfortunately, in the current stage, there are no metadata like the modified date when the contents in the album were changed. So in my case, I use the following workaround. Please think of this as just one of several workarounds.
Workaround:
If the number of photos in the album is changed, it can be known by the property of mediaItemsCount.
If the cover photo is changed, it can be known by the property of coverPhotoBaseUrl.
If several photos in a album are changed without increasing and decreasing the number of photos, unfortunately, in the current stage, I think that it is required to confirm the creationTime, filename and so on using the method of mediaItems.list.
By confirming from above in order, I can know about the change of the album.
References:
Method: albums.list
Method: albums.get
Method: mediaItems.list

flickr4java: can't retrieve list of people in photo

I have uploaded a test photoset in flicker (photoset) and the tagged a couple of users in each pic of the set.
Now I want to be able to retrieve the list of people in a given photo of that set, but the list always comes empty. This is my flickr4java code:
Flickr flickr;
PeopleInterface people=flickr.getPeopleInterface();
PersonTagList<PersonTag> persons= people.getList("17224159072");
for(PersonTag person:persons){
System.out.println("UsER:"+person.getUsername()) }
The debugger shows that the photo indeed contains people
hasPeople=True
and even the API explorer is able to retrieve the list but, as I said, persons is always empty. I have no trouble retrieving other information.
Any ideas?
Thanks

Instagram api: how to get photos containing like?

in my application, i enter a user name and get his photo.
(To get photos, i use: https://api.instagram.com/v1/users/3/media/recent/?access_token = ...)
Request returns only 20 pictures, how to get all photos user?
I want to get photos of this user which contain his likes.
How can this be done?
I have an idea to get all the pictures that have user and check each pictures does it have his like ?!
But I get only the data for the four member who delivered Like, although photo has 50 likes. (See the screenshot below). Why so ? How to fix it ?
Thanks for the help.
It's a two step process:
1) Perform a GET request to /users/user-id/media/recent inorder to get the most recent media published by a user.
2) Then perform a second GET request to /media/media-id/likes in order to get a list of users who have liked this media.
At this point you can record all the media-id's which contain likes by the specific person you want.
Here is the API for instagram users:
http://instagram.com/developer/endpoints/users/
Here is the API for instagram likes:
http://instagram.com/developer/endpoints/likes/
As for getting the entire history, I apologize but I'm unclear as to how to go about doing more than what they provide.
Please let me know if you have any questions!

is it possible to return all photos (in all sets) organized by set?

I've got a public flickr with multiple sets.
What I want to do is, with one API call, get all photos from all the sets but have each photo tagged by set.. is this possible?
I can only seem to find API calls that will get all photos for 1 set (flickr.photosets.getPhotos), or all photos in all sets (flickr.people.getPhotos) but can't seem to find one that will get all photos in all sets but somehow tag/id what set each photo belongs to...
possible?
thanks!
You may do the following:
1.get the list of sets for specific user by using
flickr.photosets.getList
2.loop through all sets that the user has and get photos using
flickr.photosets.getPhotos
3.Using
flickr.photos.addTags
to add tags to all the photos in this set

Spotify API returns too many albums when browsing an artist

After calling sp_artistbrowse_create, and making sure it's completely loaded, I try to retrieve all of the albums by this specified artist, but it seems that those albums are not grouped properly, since I get multiple album objects with the same name. For instance, if I browse David Guetta in the Top Artists list, I get over 600 albums, most of them share the name.
Is this the correct behavior? If it is, is there an attribute I can further group by to get the real listing of that artist's albums?
Check the sp_album_type() of the albums - a lot will be singles or "appears on" albums. Also check sp_album_is_available() to see if an album is actually available.

Resources