27
28

More than 5 years have passed since last update.

Rubyで使えるGoogle API一覧

Last updated at Posted at 2013-05-23

Googleのサービス使って色々やりたいですよね!Rubyで何ができるのかちょっと調べてみました。

まずAPIクライアントとして、

というのがあります。

これは、

に書いているAPIに対応しているgemみたいです。

ただ、

client.discovered_api('plus')
client.discovered_api('calendar', 'v3')

とすれば、目的のapiが使えると書いてあるけれど、実際どういう名前で叩けばいいのか全然書いてない不親切ドキュメントです。

ソースコードみてみると、

client.discovered_apis

と打てば、使えるの全部出てくるということがわかりました。

出てきた結果を表にまとめて書いておくと以下のようになります。(2013/05/23現在)

servise name version
adexchangebuyer v1
adexchangebuyer v1.1
adexchangebuyer v1.2
adexchangeseller v1
admin directory_v1
admin reports_v1
adsense v1
adsense v1.1
adsense v1.2
adsensehost v4.1
analytics v2.4
analytics v3
androidpublisher v1
audit v1
bigquery v2
blogger v2
blogger v3
books v1
calendar v3
civicinfo us_v1
compute v1beta13
compute v1beta14
compute v1beta15
coordinate v1
customsearch v1
datastore v1beta1
dfareporting v1
dfareporting v1.1
discovery v1
drive v1
drive v2
freebase v1sandbox
freebase v1
fusiontables v1
gan v1beta1
groupsmigration v1
groupssettings v1
latitude v1
licensing v1
mirror v1
oauth2 v1
oauth2 v2
orkut v2
pagespeedonline v1
plus v1
prediction v1.2
prediction v1.3
prediction v1.4
prediction v1.5
reseller v1sandbox
reseller v1
shopping v1
siteVerification v1
storage v1beta1
storage v1beta2
taskqueue v1beta1
taskqueue v1beta2
tasks v1
translate v2
urlshortener v1
webfonts v1
youtube v3
youtubeAnalytics v1
youtubeAnalytics v1beta1

ただ、これが全部なのかとおもいきや、これでは叩けないAPIも存在するみたいです・・・。

例えば、Google Contactsの情報をいじるものがあります。
https://developers.google.com/google-apps/contacts/v3/

contactsなんて文字上には全く出てこないですよね。なんかGDataを使ってアクセスするみたいで、探してみたら以下のgdata gemが見つかりました。

これは、以下のサービスが使えるようです。

servise name
base
apps
blogger
booksearch
calendar
contacts
doclist
finance
gbase
gmail
health
notebook
photos
spreadsheets
webmaster_tools
youtube

が、4年間ぐらいメンテされて無くて、ちゃんと使えるのか不安です・・・。誰か検証して下さい。

追記:
やっぱり、Ruby1.9以降なくなったjcodeを使ったりしていて、使えなかった。まぁ大して難しいRequest送らなくていいので、自分でHTTPリクエスト送って書けばいいのかもしれない・・・。
上記の、Contactsに関しては、https://github.com/Placester/google-contacts があったので、それぞれ固有のgemを探せば見つかるのかもしれない。

27
28
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
27
28