Get Albums and Photos of specified albums using flickr api - flickr

I want to get photos from albums which I have on flickr . I have 4 albums . Curently I am doing flickr.people.getPublicPhotos method which returns all photos . Here is my url
https://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=[]&user_id=[]&format=json";
How do I get photos via albums of flickr is it possible?

You can use flickr.photosets.getPhotos. Pass the ID of your photoset; receive a list of the photos in that photoset (their IDs and titles).

Related

Google Photos API - media items without albums

I like Google Photos but I've noticed that it is lacking some basic metrics like how many media items are in my account. Also I wanted to see which of my media items are not included in any of my albums. I ended up creating a simple console app using Google Photos REST API. It uses GET /albums, then POST /mediaItems:search?albumId={id} to get each album's media items and then cross references them with a full list of media items returned by GET /mediaItems.
It worked reasonably well however I've noticed a problem with the shared items. For a shared album owned by account A, if a media item is added from another account B then its id won't be found in the list of the media items of the account A (which is not unreasonable). If such a shared media item is saved in account A its id won't match the id of the original shared media item added to the shared album (returned by POST /mediaItems:search?albumId={id}). W/out an indicator of some sort to identify if a media item belongs to another account it's challenging to filter them out. I expected to see the contributorInfo as part of the MediaItem but that attribute is not returned.
If I try to add a saved copy of the same shared item into an album using UI I get a notification message that it's already there so obviously Google Photos UI does have that info. Does anyone have any clever ideas on how to match a saved copy of a shared media item with the original? The code is available at https://github.com/pavelfomin/gphoto-manager
I ended up using ignore media items list in https://github.com/pavelfomin/gphoto-manager that I populate locally with the media items I want to ignore:
Usage: com.droidablebee.gphoto.GooglePhotoApplication [options] -token=<access token> [-Dsuppress-warnings] [-Dignore-media-items-file=<file with media items to ignore>]
--albums list all albums, sorted by name
--album-items list all items per album (use with care for large number of media items)
--items list all items (use with care for large number of media items)
--items-no-album list all items not included in any album
<access token> OAuth 2 Access Token can be obtained from https://developers.google.com/oauthplayground
use 'https://www.googleapis.com/auth/photoslibrary.readonly' as the requested scope
suppress-warnings suppress all warnings, including album media count / items mismatch
Ideally, I'd use Google Photos REST API to filter out the shared items but that does not seem to be possible at the moment.

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

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.

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!

Spotify web-api, how to distinguish between album and single

When using the Spotify web-api to get the albums from an artist, the list of albums is very large. The list contains both Albums as Singles. Is there a way to separate them?
For example:
http://ws.spotify.com/lookup/1/?uri=spotify:artist:6VSZeMeJlVPGoR2nfB6UxD&extras=album returns the following albums:
- Born In A Storm
- You Don't Have To Stay
- Blind Man’s Bluff
- Multicoloured Angels
- Multicoloured Angels
When you open the artist in the Spotify client via spotify:artist:6VSZeMeJlVPGoR2nfB6UxD you'll see that only the first result is an actual album and the rest are just singles.
There's currently no data exposed in the Web API which would solve your problem.

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