Flickr API batch download - flickr

I was wondering if it's possible to use the Flickr API to get a batch of images (by doing a REST call and defining multiple tags), and providing a download button for the end user which allows him to download a zip file of the photos? I can get a list of all the image urls in JSON format, but not a whole batch.
I can't seem to find it in the Flickr documentation but was hoping someone could give me confirmation.
Thanks!

Related

Facebook Graph API v10 image upload to Pages feed

I'm trying to upload a image to facebook via graph api v10.
i have followed the docs: https://developers.facebook.com/docs/graph-api/resumable-upload-api/
I'm getting the File-Handle as result, but i dont know how to append this File-handle to my Page post. Does anyone know what i can do with this File-Handle to attach it to a Post I'm automatically posting after the file upload was successful?
Thanks!
I´ve got the same problem. In the Facebook Graph API Documentation it says:
When we're done with uploading the data, you'll get a file handle:
{"h":"2:c2FtcGxlLm1wNA==:image/jpeg:GKAj0gAUCZmJ1voFADip2iIAAAAAbugbAAAA:e:1472075513:ARZ_3ybzrQqEaluMUdI"}
This value can be used in place of an uploaded file for subsequent
graph calls.
However, no examples or further explanations are provided on how to use the received file handler.

Download google contacts images using batch API - Node js

I have gone through the documentation of google contacts API, but didn't get anything fruitfull for Image download.
Google contacts API
When I download the image, using 1 - 1 request, then some of the images are not getting download it is giving use Batch API for download
Does the batch API only support XML?
Yes, the batch API is XML-only.
Image download requests must be spaced to prevent throttling.

How to get a published video URL

I'm trying to build my app based on Windows Media Services REST API (i'm not using any SDK, just plain rest api requests).
My steps are more or less like:
Create Asset
Assign write Access Policy
Assign upload locator
Upload a file to URL specified by upload locator path
Assign download Access Policy
Assign download locator
All those steps seems to work great but - how can i actually get the video streaming URL? I can't see anything, which looks like such url (as far as i know, it should look similar to upload URL from upload locator). Should i "fold" it by myself using some segments from various parts of api ?
Based on this article, i should append the path parameter with name parameter and /manifest (so it should looke like that: <path_param>/<name_param>.ism/manifest) but it gives me ResourceNotFound error. Anyway, i've seen that other people (like SHIBSANKAR) have found some way to obtain all asset urls so i think there is some way to do it but they have not descrbed how they've done it.
After reading all the docs and talking with microsoft support, i have figured it out. All the URL parts are returned by download locator and the formula looks like that:
#{BaseUri}/video.mp4#{ContentAccessComponent}
I hope someone will find that usefull someday.

Google Image Search API, does anyone have an example that works?

Trying to find out how to do Google image searches via an API / REST call. Apparently the image search API is deprecated and directs us to the Custom Search API.
But my first experiments with the Custom Search API, return results from my own website !!&*%%%$##!, which is not helpful in the slightest.
I need image results from Google images. Anyone have an example query that works?
You will basically want to generate a URL like this. Note the search type parameter at the end.
https://www.googleapis.com/customsearch/v1?key=YOUR API KEY&cx=YOUR CUSTOM SEARCH ENGINE IDENTIFIER&q=your query&searchType=image
You can read more here https://developers.google.com/custom-search/json-api/v1/using_rest
edit: changed searchType to lowercase based on comment below

Grab instagram photo based on hashtags

I am new to instagram and i am tasked to program an application to grab instagram photo uploads based on a certain hashtag. Meaning if the application is started and searching for the hashtag "#awesomeevent" any one that uploads a photo with that hashtags it will automatically be stored into our database.
The application should work something similar to http://statigr.am/tag/ but instead displaying the photos it should store the photos into the database.
What is the process of doing this. Any tutorials that has this from start to end. Even covering how to start creating a instagram app from scratch. any help would be greatly appreciated.
Thanks
Things we developers often overlook are the API Terms and Conditions. I've been there myself.
API TERMS OF USE
Before you start using the API, we have a few guidelines that we'd like to tell you about. Please make sure to read the full API Terms of Use
Terms of Use. Here's what you'll read about:
Instagram users own their images. It's your responsibility to make sure that you respect that right.
You cannot use the Instagram name in your application.
You cannot use the Instagram API to crawl or store users' images without their express consent.
You cannot replicate the core user experience of Instagram.com
Do not abuse the API. Too many requests too quickly will get your access turned off
However, a part in the terms also states that:
You shall not cache or store any Instagram user photos other than for reasonable periods in order to provide the service you are
providing to Instagram users.
Hope that's a start before you actually get coding and storing images.
API Terms of Use: http://instagram.com/about/legal/terms/api/
API: http://instagram.com/developer/
For starter, you should consult to instagram api.
As for the specific api you will need is:
/tags/tag-name/media/recent
For example, if you want to look for images from tag #awesomeevent, you will do an api query to:
https://api.instagram.com/v1/tags/awesomeevent/media/recent?access_token=ACCESS-TOKEN
I would have a look at the two libraries Instagram provides. The ruby library is at https://github.com/Instagram/instagram-ruby-gem and the python library is at https://github.com/Instagram/python-instagram
They both seem to have examples to get you started if you're programming with either libraries.
As far as the storing issue goes, could you instead store the URL address of the images instead of the actual images themselves? The API returns JSON information of which the URL of the images are returned.
Hope that helps.
You can use the below ruby script to retrieve the images and save them to a file. You can then either reference the file within the database or replace the last block with code for your particular database implementation. Without knowing your database type and schema, no one can tell you how to add something to it.
require "instagram"
require "restclient"
Instagram.configure do |config|
config.client_id = INSTAGRAM_CLIENT_ID
config.client_secret = INSTAGRAM_CLIENT_SECRET
end
instagram_client = Instagram.client(:access_token => INSTAGRAM_ACCESS_TOKEN)
tags = instagram_client.tag_search('cat')
urls = Array.new
for media_item in instagram_client.tag_recent_media(tags[0].name)
urls << media_item.images.standard_resolution.url
end
urls.each_with_index do |url, idx|
image = RestClient.get(url)
path = Dir.pwd + "/#{idx}.jpg"
File.open(path, 'w') {|f| f.write(image) }
end

Resources