Interfacing Google Doc Api's with Ruby on Rails - ruby

I'm trying to interface with the Google Docs APIs, namely the Google Documents List Data API v3.0.
Are there any open-source Ruby libraries that can do the interfacing? Google has a Python api released for v3.0; I'm looking for something similar.
(I'm trying to develop a webapp that converts from PowerPoint to a Google doc.)

Have you tried the gdata gem? I'm not sure it helps, but it has a number of clients for working with Google Data APIs, namely the DocList...

Related

Google translate API with synonyms

I am using Google translate API in my iOS app. But to get the best fit translation for my words, I need to get synonyms of translated word like it present on Google Translate web page.
I have found some libraries which provide synonyms but all works with English words only.
Is there any Google API which we can use with google translate api to get synonyms of translated word in target language.
The Google Translation API service doesn't support the multiple translations of a word functionality. This feature is only available via the web interface at translate.google.com, as it is mentioned in the Google's official FAQs documentation.
Based on this, it seems that GCP doesn't offers a specific API alternative you can use to get synonyms; Therefore, I think you should try by using third-party software, such as Datamuse API or the libraries you mentioned before, to get the synonyms and then translate them by using the Google Translation API service as an available workaround.

Ruby: Fetch data from google analytics?

I want to gather google analytics data for daily/monthly report. All visitors, visitors for specific path and conversion rate. Setting for google analytics is already done (I think).
I searched ruby libraries, but many informations are out-of-dated and google api is sometimes update.
Now(2012-09-28) what library is popular? And How to get data? I searched ruby-toolbox, but both two libraries are still active?
Libralies
'garb'
https://github.com/vigetlabs/garb
'google-api-client'
http://code.google.com/p/google-api-ruby-client/
Purpose:
My first step: view data
My second step: edit data(Add note or notation)
thanks,
Google-Api-Client works fine, is an official client and is constantly updated, just check the commit logs and you will see. Note that this API is not for Google Analytics only but for any Google API that uses the Google Discovery API. You should try that.
Regardless of the client that you use make sure it's compatible with the latest version of the API. If it's built using the Google API Discovery service it's a plus because that means the client library will have support for new methods as soon as they are available. It's like an API for building API clients.
GARB on the other hand seems to be abandoned for a while and is probably missing out on several features that came recently.
Note that the Google Analytics API are currently read only. So no client library will support that since there's no API for writing annotations. There's a feature request for that though.

Google API Oauth 2 with Installed App

I am using Google API OAuth 2.0 for Installed Applications & php. This is a WordPress plugin we are updating, and it was recommended to us by Google support to use Installed App instead of Web App "because you will then have a single Project ID, your users won't need to create their own using the APIs Console"
I am wrestling a bit to get the proper setup for this - Web App samples were easy enough, but I cannot find a single example of the code setup for creating these:
https://developers.google.com/accounts/docs/OAuth2InstalledApp#formingtheurl
It says I should use "code" & "grant_type", but I don't see any functions in the apiClient to set these.
As I'm prolly not being very clear, what I'm looking for is the equivalent of this:
$client->setClientId();
$client->setClientSecret();
$client->setRedirectUri();
$client->setDeveloperKey();
$client->setScopes(array('https://www.googleapis.com/auth/analytics.readonly'));
For Installed Apps.
Thanks!
The Google Drive SDK documentation includes a step-by-step quickstart sample that uses OAuth 2.0 for Installed Applications:
https://developers.google.com/drive/quickstart
This is the code you are looking for:
$client->setClientId('YOUR_CLIENT_ID');
$client->setClientSecret('YOUR_CLIENT_SECRET');
$client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
$client->setScopes(array('https://www.googleapis.com/auth/analytics.readonly'));

Unable to google Google-API directory

I know its silly, but previously this URL used to show me all available google open source API's Pervious working API link but now its showing some other page. I am tired of searching the complete API directory. I want to pick one to learn. I have managed to find a similar page which shows only partial API's directory. Google API directory Can any one provide me the correct URL to see complete directory?
I must admit, it's a mess if you take a fresh start.
Accessing Google Apis can be basically be done in two ways.
The old way : Google Data Java Client Library (a.k.a. "gdata-java-client") : docs here. Implemented services can be found at Google Api Docs (the link you are referring to).
The new way : Google API Client Library for Java (a.k.a. "google-api-java-client") : docs here. The Api explorer shows the generated client libraries using the new infrastructure. Or this list.
Both libraries are available for different languages and for different Google services. GData is the most mature library and supports most services.
The new way however is more flexible : the client libraries and even the docs can be automatically generated for any Google service that is ready to transition to the new infrastructure. On the downside, not all Google services have a client library ready for the new infrastructure (e.g. Contacts).
You can access services that are not yet transitioned but you have to write your own XML model.
There is a migration guide to move from GData to new infrastructure.
try to find it on this page:
http://www.programmableweb.com/apis/directory/1?company=Google
or you can explore some apis here: (i don't know if thats all)
http://code.google.com/apis/explorer/
or just search what you need on:
http://developers.google.com

What would it take to add support for the Contacts API to google-api-ruby-client?

I'd like to use the official Ruby client library to access the Contacts API, but that one is not on the list of supported APIs. What would it take to change that? I'm willing to pitch in, but a shove in the right direction would help. Thanks!
Isn't this already supported with the Google Data on Rails API? Integrating this in the official Ruby client library shouldn't be that much work.

Resources