Google+ API の紹介Google Social Developers 忘年会 2011
Google API Expert (Social)Nobuhiro Nakajima
本日のゴール
Google+ API https://developers.google.com/+/api/ ●Google+ API で何ができるのか?●Google+ API を利用する準備●Google+ API のアクセス (デモ)●Google+ API の制限とこれから
Google+ API は、フツー過ぎる API です
●RESTful API + JSON data formats ○Portable Contacts (PoCo)
http://portablecontacts.net/ ○Activity Streams
http://activitystrea.ms/●Authorization
○API key○OAuth 2.0
http://oauth.net/2/
https://www.googleapis.com/plus/v1 /people/116230859957417487205
{ "kind": "plus#person", "objectType": "page", "id": "116230859957417487205", "displayName": "まんてん", "tagline": "tattva 社員犬", "aboutMe": "トライカラーのウェルシュ・コーギーです。", "url": "https://plus.google.com/116230859957417487205", "image": { "url": "https://lh6.googleusercontent.com/.../photo.jpg?sz=50" }, "urls": [ {
現在の Google+ API で何ができるのか?
●プロフィールの検索 ●プロフィールの取得●投稿の検索●投稿の取得●投稿のコメントの取得●投稿に +1 したユーザの取得●投稿を共有したユーザの取得
https://www.googleapis.com/plus/v1 /people?query={SearchString}
プロフィール情報の検索
プロフィール情報の取得
https://www.googleapis.com/plus/v1 /people/{userId}
投稿の検索
https://www.googleapis.com/plus/v1 /activities?query={SearchString}
投稿の取得 #1
https://www.googleapis.com/plus/v1 /people/{userId}/activities/public
投稿の取得 #2
https://www.googleapis.com/plus/v1 /activities/{activityId}
投稿のコメントの取得 #1
https://www.googleapis.com/plus/v1 /activities/{activityId}/comments
投稿のコメントの取得 #2
https://www.googleapis.com/plus/v1 /comments/{commentId}
投稿に +1 したユーザの取得
https://www.googleapis.com/plus/v1 /activities/{activityId}/people/plusoners
投稿を共有したユーザの取得
https://www.googleapis.com/plus/v1 /activities/{activityId}/people/resharers
Google APIs Console によるGoogle+ API のアクセス準備の流れ
1. Google APIs Console https://code.google.com/apis/console/
2. プロジェクトを作成する 3. プロジェクトの利用サービスとして Google+ API を ON
にする4. API アクセスの条件を設定する
1. API Key を生成する2. OAuth 2.0 Client ID を生成する
5. Google+ API にアクセスする
API key によるGoogle+ API のアクセス
デモ https://www.googleapis.com/plus/v1 /people/{userId}?key={API key}
OAuth 2.0 token によるGoogle+ API のアクセス #1https://accounts.google.com/o/oauth2/auth?client_id={clientId}&redirect_uri={redirectUri}&scope=https://www.googleapis.com/auth/plus.me&response_type=code
OAuth 2.0 token によるGoogle+ API のアクセス #2
https://www.googleapis.com/plus/v1 /people/meAuthorization: OAuth {AccessToken}
Google APIs Explorer によるGoogle+ API のアクセス
デモ
Google APIs Explorerhttp://code.google.com/apis/explorer/#_s=plus&_v=v1
現在の Google+ API の制限
● Read only and Public data○データの取得のみ○取得できるデータは一般公開のみ
● Quota○ 1ユーザの一秒あたりのリクエスト数
5.0 requests / second / user 変更できる○ 1日あたりのリクエスト数
1,000 queries / day 変更申請できる
Google+ API のこれから? 希望?
●POST, POST とにかく POST●一般公開でなくサークルのサポート●Quota の緩和●特定のパートナーは使えるらしい?
Thank you for everyone
Please love more Google+ API
Top Related