More Related Content Similar to Google api應用入門 Similar to Google api應用入門 (20) Google api應用入門2. ● 漫遊Google API
● Google的API工具
○ API Console介紹
○ API Explore介紹
● 從認證開始
○ OAuth2
● Google API的使用
○ 從Calendar API開始
○ 玩玩Drive API
● 淺談進階的API操作 - Apps Script
Outline
3. Why Here...
Cloud Changes the Developer
曾幾何時...
● system and os
● network setup
● install what I need
● mail sdk
● sms bridge
● backup and archive
● socket protocol
● using versioning for
develop
● ...
現在...
● cloud machine
● vpc and permission
● software preload
● email service
● sms service
● object storage
● restful protocal
● git supported
deploy
● ...
7. Start Implements of API
REST
SDK
Web
Mobile
Developers use non-standard language
Developers use standard toolkits
End users
End users
10. Google API Console - Services
API
Name
API
On/Off
Notes
for limit
Help page &
documents
11. Google API Console - Access Control
Access
Control
Project
Info
Project
Setting
ID info
list
20. Google API Java Client
https://code.google.com/p/google-api-java-client/wiki/APIs#oauth2
21. Google API .NET Client
http://code.google.com/p/google-api-dotnet-client/wiki/APIs#Oauth2
25. ● OAuth 2.0
● OAuth 1.0
● Hybrid protocol(OpenID
+ OAuth)
● OpenID
Google Implemented
Auth(s)
29. Oauth優點
● 簡單:不管是 OAuth 服務提供者還是應用開發
者,都很容易於理解與使用
● 安全:沒有涉及到使用者金鑰等資訊,更安全
更靈活
● 開放:任何服務提供者都可以實現 OAuth,任
何軟體發展商都可以使用 OAuth
31. What Calendar API can do...
Functions
● acl
● calanderList
● calendars
● events
● setting
● ...
34. Read the request and result
$ curl https://www.googleapis.com/calendar/v3/users/me/calendarList/mitac.com.tw_4gqp4u0bit7....o%40group.
calendar.google.com -H "Authorization: Bearer ya29.AHES6ZSBtCsGQhpkmB....jcbOSY46jflrKKa4"
{
"kind": "calendar#calendarListEntry",
"etag": ""hTTG_yZRNM6RHYgIq0uRTKezdKo/GXuSxc1o...Vkx1AgpzIOs"",
"id": "mitac.com.tw_4gqp4u0b...ugl7mi54ho@group.calendar.google.com",
"summary": "7C2 假表",
"description": "請貼上自己的假nex: 姓名/事由",
"timeZone": "Asia/Taipei",
"colorId": "3",
"backgroundColor": "#f83a22",
"foregroundColor": "#000000",
"selected": true,
"accessRole": "owner"
}
41. 淺談一下Apps Script
● JavaScript like programming language
● Cloud IDE integrate to Drive
● Easy access to Google services
● Some container integrate
● Free!
● Robust!
42. Apps Scripts目前種類
● Standalone Scripts
● Container-Bound Scripts
● Spreadsheet Custom Functions
● Web Apps
● Google Sites Gadgets
● Container Extensions
52. ● Oauth 2: http://oauth.net/2/
● Oauth1&2差異:
○ http://www.cnblogs.
com/lingyun1120/archive/2011/12/12/2284788.html
○ http://blog.sina.com.cn/s/blog_4c9ba28501015ux6.
html
● Google API Console: https://code.google.
com/apis/console
● Google API Explore: https://code.google.
com/apis/explorer/
● Apps Script Site: http://www.google.com/script/start/
● Apps Script Docs: https://developers.google.com/apps-
script/
Reference