Trying to find REST API Examples (Real Time) - theory

I am trying to find some real-time RESTful APIs but I found nothing except GitHub. I am eager to see a few live examples, so do anyone has a few examples like GitHub REST API?

Related

Trying to develop a simple web using the Google Speech API, don't know where to start

I am trying to use the Google Speech API to transcribe audio captured from a semi-embedded device. The device supports python scripts, but does not seem to offer any way to allow imports.
I have managed to get the speech API sample program working on my computer, but since I cannot import the necessary modules, I see myself forced to develop a web application that accepts an audio file and returns the transcript.
I am completely new at web development, and so far I have concluded that I'm going to need to use Google App Engine, but beyond that I'm completely lost.
I have identified the following steps, and if someone could point me in the right direction that would be greatly appreciated:
Allow uploading of a flac file to a certain URL.
Upload the flac file to the google speech API and receive the transcription (I'm fairly certain I could manage this myself).
Return the transcription to the device somehow.
I'm not asking for finished code or anything, but it would be nice if somebody could tell me at the very least if what I want to do is possible with the google app engine, or if I need to look for something else.
What you want to do is absolutely possible with Google App Engine. Take a look at the App Engine Python tutorials to get started with the environment etc., but it sounds like what you want will involve an API that accepts a POST with binary data in the body (the FLAC) and then passes that to the Speech API (try the GRPC samples).
Good luck! :)

Google Calendar Api Documentation better than the official V3

Please I want to create Event in Google Calendar API but the documentation official is BAD I cant use it .. And someone here who can help me please!! Sorry with my english but I speak spanish!
I agree...
This helps a bit: Google Calendar Events
Depending on the process you are using, there are few examples for using asp.net and the service account option. I successfully created events via service account with granting domain-wide access. With this you just need to create an app, then service account for the app and follow the domain wide delegation steps on the google documentation pages. This option is great if you have an app that needs to create events without having to authenticate the user.
For working code and more info you can see what I used at-
Google API Calender v3 Event Insert via Service Account using Asp.Net MVC
What is "bad" about the documentation? (Don't just complain; provide actionable feedback.) In the v3 docs, check out the reference section on creating events. There is even sample code in Java, Python, PHP, and Ruby to help get you started just below the reference. In addition, below the sample code is the APIs Explorer where you can issue requests with appropriate payload to the API and see the HTTP response to ensure you're calling the API correctly and receiving the data you requested. If there's any additional way for us to improve the docs, please let us know!
UPDATE (Sep 2015): I created a blogpost and video that walks through some pseudocode (well, it's Python) for creating events. There are examples in most other languages too.

Google App Engine Calendar

Does anyone have a link or can provide the code for a Java Google App Engine project which simply interacts with Google Calendar. Say get an event from your calendar.
The Google Sample calendar-appengine-sample does not compile once checkout out from HG and I have tried searching for tutorials and creating my own with only small bits of luck in places.
I have already set up an API Access project to get the client-secrets.json.
So as much as some think this is a poor question it demonstrates that there is not much out there in terms of help with the combination of Java, App Engine and OAuth. I have an ex Google employee at my company and he did agree that it is not as straightforward as it should be.
Based on the reply to my post on the Google Group I decided to use Python where the OAuth2Decorator makes the task trivial.
This was a very useful tutorial: https://developers.google.com/appengine/articles/python/getting_started_with_tasks_api
If you HAVE to use Java these I apologise for this not really helping you, but if you are willing to give Python a go then I recommend the above link and using PyDev with Eclipse.

Using google API's from Appengine (OAuth)

I want to use Google Prediction from a Python Google App Engine Application. Google Prediction requires you to store your "prediction models" in Google Storage for Developers, in effect meaning that to use GP you must use GSD. Unfortunately, both GP and GSD seem to require OAuth 2.0 .
This Oauth stuff is really getting in the way though! All the examples I find seem to deal with the case of wanting for access a users data/credentials/identity/whatever using Oauth. I have no need for that. I simply want to access a resource (GP and GSD) from my server using http request. Repeat, I just want to use some of their services, I have no need at all to access any other users information!
I can see from my Google API console that I have created both a id and secret for my GAE applications domain. Is it not possible to just use these values to do OAuth authentication to other Google API's? Effectively saying "I am the application at domain xyz, here are my credentials, let me use your API"? It seems kind of ridiculous that Google is currently forcing people to use such a burdensome authentication system for things that they are trying to get people to try out?
I am hoping there is some magical awesome library that will take care of all these OAuth details for me. Short of that, a code example of how to do these things in Python App Engine would be useful. I just want to use the Google Prediction and Google Storage for Developers services from my python GAE app, but I am blocked by the burden of having to configure all of this OAuth stuff. Isn't there some easy way to do this?
Look at the Google API Python Client. You should just be able to put your tokens in and connect. There are some examples on the page that should give you enough information to connect in.
I'm the Product Manager at Google working on the Prediction API. The first thing I want to say is thank you for trying out the API and for reaching out to the world about your issues! We hear you! We are very aware of the difficulty of using the API in some cases and some of the pain OAuth2.0 can cause for the simple use cases. In particular I tried to do exactly what you were doing a few weeks ago and was myself rather frustrated! We're working on it!
OK, so, that's all nice and dandy, but do I have anything helpful for you? Hopefully I do! I managed to get my GAE application working with GP -- I shelved the GSD component for the moment as I ran out of time, so hopefully somebody else can lend you some sample code for that (it should involve using boto & OAuth to handle the tricky bits).
from apiclient.discovery import build
from oauth2client.client import OAuth2Credentials
# You can find an example oauth2client in the python prediction sample code
# Replace everything in <>'s
credentials = OAuth2Credentials(
"<access_token>", #probably empty string
"<client_id>",
"<client_secret>",
"<refresh_token>",
<Expiry>, # Probably None
"https://accounts.google.com/o/oauth2/token",
"<app_useragent>")
http = credentials.authorize(httplib2.Http())
service = build("prediction", "v1.3", http=http)
You should be able to get the client id an client secret from the API console. You can use any sample application or demo, e.g. the python sample code, to generate a refresh token.
Best of luck! Feel free to followup directly with me (zg#google.com) or post to our public discussion list (prediction-api-discuss#googlegroups.com) if you still have any trouble.

How to track if browser is Silverlight enabled

I'm trying to get some stats on how many of the visitors to our website have Silverlight enabled browsers.
We currently use Google Analytics for the rest of our stats so ideally we'd like to just add 'Silverlight enabled' tracking in with the rest of our Google Analytics stats. But if it has to get written out to a DB etc then so be it.
Nikhil has some javascript to Silverlight tracking to Google Analytics. I have tried this code but Google Analytics doesn't pick it up.
Does anyone have any other ideas/techniques?
In case you missed it, there's a link to a more detailed article as well in the comments: http://blogs.msdn.com/jeffwilcox/archive/2007/10/01/using-google-analytics-with-rich-managed-web-applications-in-silverlight.aspx
Edit: As David pointed out, this article covers the reverse scenario more (how to write your silverlight app so that it plays well with Analytics).
I think you answered it yourself. The page you are linking to does just that: detect which version of Silverlight the user has (not if s/he installs it). From the page:
After a little poking around, I found that Google Analytics has support for reporting a user-defined field.
...
Basically this detects the presence of Silverlight, and if its available, it records the version as the value of the user-defined field. Now your analytics reports will have one of three values: "(not set)", "Silverlight/1.0" or "Silverlight/2.0".
#Vaibhav
The Using Google Analytics with rich (managed) web applications in Silverlight article is very interesing but is more focused on how to get your Silverlight app to send messages to Google Analytics.
#Cd-MaN
Yeah, I thought that too but I have tried running my page with Nikhil's javascript and Google Analytics didn't pick it up. But I could have screwed something up somewhere.
I'm just interested to know if anyone else has managed to do this (track Silverlight-ness) successfully.
I've written a lightweight Silverlight library that helps make it easy to integrate Google Analytics in your silverlight app. You can grab download the code or binaries here.
I think the code posted on Nikhil's blog is out of date if you are using ga.js and not urchin.js.
The use of the global function __utmSetVar() is replaced by the tracker method _setCustomVar()
http://code.google.com/apis/analytics/docs/gaJS/gaJSApiBasicConfiguration.html#_gat.GA_Tracker_._setCustomVar

Resources