Flickr API: Programmatically Accessible Documentation - flickr

I'd like to be able to programmatically query the API. For example, I'd like to know what arguments are required/optional, and their types, for a given method. The info must be somewhere because it is used by the Explorer, but I didn't see a way to access it, and I struck out searching because the terms are so generic (e.g. 'metadata' brings up tons of hits on EXIF).
I'm asking because I'm writing a wrapper and want to provide interactive help without having to scrape the web documentation.

Cool! They have exactly what I wanted...
From https://www.flickr.com/services/api/flickr.reflection.getMethodInfo.html :
Example Response
<method name="flickr.fakeMethod" needslogin="1">
<description>A fake method</description>
<response>xml-response-example</response>
<explanation>explanation of example response</explanation>
<arguments>
<argument name="api_key" optional="0">
You API application key.</argument>
<argument name="color" optional="1">
Your favorite color.</argument>
</arguments>
<errors>
<error code="1" message="Photo not found">
Full explanation...</error>
<error code="100" message="Invalid API Key">
Full explanation...</error>
</errors>
</method>

In short, no, Flickr does not provide what you are looking for.
What you are describing is an introspective API, and Flickr does not currently provide that. Introspection is an option for API providers, and as stated the Facebook Graph API does have minor support for this with the metadata field. A good example of a framework to help create introspective APIs is sandman, but most companies tend to do one/two of the two popular options for updating APIs.
Announce any changes to their API before making them
Write their own official client wrapper in x many languages
Flickr does not have any official client wrappers, but they do link to unofficial client wrappers on their API page.
Since you are looking to build and maintain your own non-official Flickr client wrapper, and Flickr does not provide an introspective API, you are left with the first option of reading announcements to API changes.
These exist through their changelog blog, as well as through their Flickr API Twitter account. Luckily these events should not happen often so it should not be much of an issue. An additional resource you could use as an extra layer of defense for API updates is a continuous integration service such as Travis CI to make sure API calls with your wrapper are working as expected.
Your main concern does seem to be the initial generation of your client API wrapper which will inevitably require some manual labor without a introspective API on Flickrs end (but hey that the whole point of writing the wrapper right, so that other people don't have to do the manual labor :D). Depending on the language you are working with to create a client wrapper though, there may be some tools to help you automate a portion of the client wrapper.
One example is that many Object Oriented languages have tools to help parse JSON and convert it into Models for the corresponding language such as Java, C#, Python, More Python, etc.

Related

How to access Google Classroom without API?

I'd like to automatize some processes that are not yet available through API(Google Classroom), like posting comments on announcements, seeing private comments on my work and so on. I have trouble accessing my account. I'd like the app to be able to run on a server. I'm currently working with node.js, but if there is an easier approach I'll gladly accept it (free if it's possible). Can you give me an example of how it's done because currently, I am struggling to find every button that needs to be clicked on?
Unfortunately, there are no methods right now to accomplish that. You can leave a feature request on Google Issue Tracker describing what methods you would like to use. Google engineers will study your case and, if applicable, they will develop the requested methods.
You could use something like Selenium with your language of choice (Javascript in this case) to automate the browser clicks.
This is however, not the best of ideas... To make Selenium log into your account you will need to hardcode your password somewhere.
Google services use Oauth for authentication, take a look at the Classroom API Getting-started for instructions on how to work with Google Classroom API.

Why Rest Api in Sharepoint

What is the main reason that we go for Rest Api in SharePoint 2013. Already we have Client Object Model for implementing application. Anybody can please guide me.
The Client Side Object Model is built upon the REST API so that is one reason for it to exist. For good JavaScript developers they may like the simplicity of the REST API. For people trying to keep their page size to a minimum, they may appreciate forgoing the size of the CSOM and its dependencies. Lastly, in mash up scenarios with other tools, having an easy way to address content via REST urls makes for better interoperability with other tools instead of relying on a product specific API (i.e. the CSOM).

Is there a Cross Platform Library for the Xamarin Stack to track usage with Google Analytics?

I want to track usage for my Cross Platform Apps developed with the Xamarin Tools (MonoTouch, MonoDroid, Windows Phone) with Google Analytics. While there is a MonoTouch binding around, it seems I need to create the MonoDroid binding myself (see this hint). I've not jet investigated WP.
Because some of my tracking takes place in the shared code between platforms --- and for general ease of use, I am looking for a common library to be utilized in all three projects. Is there something like this around? If not, is there some hidden problematic why such a library can not easily be created?
I know this is an older thread, but I thought that I would add that there is now a component for Google Analytics: http://components.xamarin.com/view/googleanalytics.
You should be able to make the Google Analytics requests yourself, using Google's API in C#.
This would work on all three platforms, but I have not found an open source project for this. There are several code examples, online however, here is a link.
I found a native C# implementation which generates the tracking requests by itself instead of wrapping the platform specific tracking libraries from Google into a common API: https://github.com/maartenba/GoogleAnalyticsTracker
Unfortunately the code does not accumulate tracking requests to dispatch them in intervals, but for my purposes it's sufficient.
There is also another implementation where tracking methods and request dispatching are separated (but not carried out automatically): http://www.diaryofaninja.com/projects/details/ga-dot-net

Any libraries that can make accessing Google APIs as a service account simpler for NodeJS?

Background: My idea is to create a primarily content-heavy website (think news articles or blog posts) written entirely in nodejs. Since creating content on Google Drive (Google Docs) in particular is very simple, what I would like to do is have Nodejs retrieve the website's content from Google Docs.
Challenge: As far as I can tell, the correct way to do this according to Google is to create a Service Account so that the application can access the files stored on Google Drive without requiring user-intervention in the form of a confirmation. Google provides three libraries--java, python, and php--for server-to-server requests. Does anyone know of anything similar already written by the Node community? I am aware of node-oauth but I've searched through it's source and haven't found anything referencing private keys, which are required for server-to-server interaction, which I'm taking to mean it's not supported. Writing one is also an option, but I'd like to avoid that if at all possible. Looking at the Google-written Java Oauth2 client library makes it pretty clear that it's not an easy task.
Thanks in advance!
This is one library I've found that looks pretty thorough and complete for creating JSON Web Tokens: JWCrypto
I know this thread is old, but in the event others arrive here looking for an answer:
Google is working on an official module to access all of their API's. Its alpha so be careful but it looks very nice- github repository

How to access Wikipedia using Node.js

I am looking into the simplest way to integrate Wikipedia into a node.js app.
The requirements are to be able to search for entries and find entities in each entry.
Any known existing libs/methods for that?
Thanks
There's a newly available open source parser for wiki text (http://sweble.org/) that might be useful to you if you roll your own solution. Of course that would require you downloading the wikipedia data dump, parsing, and storing entities in a db.
You could also look at dbpedia (http://dbpedia.org/About), though that would require integrating the rdf stack into your app (either running a local rdf repository or communicating with the often flaky online version via sparql).
One easy approach is to use a search engine api and restrict to site:wikipedia.org - e.g:
http://www.google.com/search?q=node.js+site%3Awikipedia.org
I've found that can work really well.
Spider for scraping using jquery is fantastic:
https://github.com/mikeal/spider
Mikeal is the man
Presumably you'd be using this for a side (personal) project though. Not sure how kosher it is to run wild on wikipedia with a scraper.

Resources