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

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

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

Can I GET a list of images not in an album without a bearer token?

I am writing a simple extension for phpBB. It will list thumbnails of images below the posting window to make insertion into the message easy. The user will setup their flickr nsid (with the help of a lookup function) and/or imgur username. When they create or reply to a thread a window is shown below the message window. They can select from any image host they have setup. A second drop-down will show the user's public albums. I would like to show all of the users 25 most recent images by default. If they want something more specific they can select an album from the list.
I can populate the album list and get a listing of the images in that album without using a bearer token. I would like to be able to do the same for all public images not in an album. It doesn't make sense that this would require additional authorization. Is this something that is possible? I would really like to stick to the un-authed methods.
Thanks.

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: Get photos from a tag after a specified photo

I'm working on an instagram scraper for something and I'm trying to figure out if it's possible to get all photos for a tag that have an id or timestamp later than the last one I have.
The instagram API docs are useless in that they don't have any real info on pagination (which I presume I'll have to abuse).
Does anyone have any ideas?
I've been slogging through the Instagram API for the last couple of days so here's my 2 cents worth:
As far as I can see it if you call the api with /tags/tag-name/media/recent it only return a list if items. If the amount exceeds about 25 you have to make another request with the pagination value returned in the previous request.
In order to gain some control I am initially iterating through all images and storing the results (just the URL not the actual image) to a database. Now I can manipulate however I want. When I feel like updating (I'm doing it manually now but could be a cron job or use the real-time api) I re-read all the images, compare to what I have in my DB and add possible new images. My app then reads out the url and info from my DB (which btw is a heck of a lot faster than going through the instagram api, which will only return about 25 images per request - regardless of any 'count' parameter value you put in the request url) and displays it.
I am developing this for a client who is afraid of people posting nsfw or whatever pics using their dedicated hashtag (for a contest) - with the above set up I can offer them an interface where they can check and mark images that are then displayed in the app.
One thing to watch out for is when a user deletes his picture; you will have to find a way to check for this. Currently (since I'm lazy) I load all images and use jquery to check for an error loading the image. If there is one I delete the image from the DB (via ajax).
I'm not sure the pagination is going to help you: as far as I can see the pagination response has no relation to the id's of the actual image objects on each page - so theoretically a pagination id that jumps to a certain page (i.e. date) might not work tomorrow if enough images have been deleted in the mean time.
to get all images instead of latest 20, just append &count=-1 to your api call - it's that simple.
In either case, there is a timestamp on each json object - or if you prefer, you can use max_tag_id
check out my post here: there any way to show more than 20 photos of the instagram API?
* Update April 2014: count=-1 is no longer available.

Flickr photos by group with location name

I am grabbing photos from my 2 flickr groups using the API method flickr.groups.pools.getPhotos. This is ok but i'd like to actually return the town name rather than just the geo location. Does anybody know of an alternative method to grab my images including the geo location, town name, and the group that they are in? I'd rather not make multiple API calls per image.
Thanks
So it appears there is no way of doing this. I had to call flickr.groups.pools.getPhotos then flickr.photos.geo.getLocation on each image to get its location. Not the best solution but it is then being cached into a db for improved performance, then only called once every 30 mins.
You can get location attributes by adding "geo" parameter to extras argument for flickr.groups.pools.getPhotos request.
extras (Optional)
A comma-delimited list of extra information to fetch for each returned record. Currently supported fields are: description, license, date_upload, date_taken, owner_name, icon_server, original_format, last_update, geo, tags, machine_tags, o_dims, views, media, path_alias, url_sq, url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l, url_o
In response you will receive geo latitude and longitude for each photo from group.

Resources