GDG DevFestDC
May 2017: Tysons, VA
BayPIGgies
Aug 2016: Mountain View, CA
Exploring G Suite & Google APIs
in Python & Javascript (coding workshop)
+Wesley Chun, @wescpy
Developer Advocate
Can't wait? pip{,3} install -U google-api-python-client
AND console.developers.google.com
SF Python project night
Oct 2016: San Francisco, CA
GDG NYC meetup
Nov 2016: New York, NY
Outline
● Overview
● Getting started
● Authorization boilerplate
● Motivational ideas
● Wrap-up
● [hacking + API usage examples]
Google APIs overview
BUT
... wait, there’s more...
Getting Started with Google APIs
Developers Console (devconsole)
OAuth2 scenarios
● Varies on application type (where apps located)
○ Web (server) applications
○ Installed (mobile & desktop computers) apps
○ Service accounts (cloud/server-to-server)
○ Client-side (JavaScript) apps
○ Limited-input devices (game consoles, printers, cameras, etc.)
○ developers.google.com/identity/protocols/OAuth2
○ TODAY: command-line script == "Installed"
Authorization boilerplate
developers.google.com/discovery/libraries
Open source client
libraries for many
languages, not just
SIMPLE
AUTHORIZED
Which do you choose?
Simple API access
Authorized API access
Motivational ideas
Write your own or see
github.com/googledrive/zipextractor (JS)
Build a Node.js customized reporting tool with our
Sheets API codelab at g.co/codelabs/sheets (JS)
Check out our Node.js Markdown-to-Google Slides
sample app demoing the Slides API
github.com/googlesamples/md2googleslides (JS)
Wrap-up
Alternative
● Google Apps Script
○ What is it?
■ Executes as JavaScript in Google's cloud
■ Think “built-in” services vs. traditional API usage
■ Convenient access to G Suite/Google Apps data
■ Can also access other Google+external services
■ developers.google.com/apps-script
○ Video resources
■ developers.google.com/apps-script/guides/videos
(intro/Sheets, Maps & Gmail, YouTube [Data], Forms)
Summary
● We’ve created great tech but can’t build everything(!)
● APIs: our tech available for your apps; free?!?
● Access w/favorite dev tool via Google APIs Client Library
○ Python, JavaScript (client + Node.js), Java, C#/.NET, Go,
Dart, Ruby, PHP
○ Also mobile: Android (Java), iOS (Swift, Objective-C)
● Build the next great thing!
Reference
● Blog + video Resources
○ SETUP & BOILERPLATE
■ goo.gl/RbyTFD (new Google APIs project setup)
■ goo.gl/KMfbeK (common Python boilerplate code review)
○ G SUITE APIs
■ goo.gl/ZIgf8k and goo.gl/EySSQV (Google Drive API)
■ goo.gl/pFYUQ2 (Gmail API)
■ goo.gl/KuYMiq (Google Calendar API)
■ goo.gl/N1RPwC and goo.gl/U6Oljn (Google Sheets API)
■ developers.google.com/slides/videos (Google Slides APIs)
Thank you! Questions?
+Wesley Chun
google.com/+WesleyChun
@wescpy
twitter.com/wescpy
slide deck
goo.gl/NjCC0H

G Suite & Google APIs coding workshop

  • 1.
    GDG DevFestDC May 2017:Tysons, VA BayPIGgies Aug 2016: Mountain View, CA Exploring G Suite & Google APIs in Python & Javascript (coding workshop) +Wesley Chun, @wescpy Developer Advocate Can't wait? pip{,3} install -U google-api-python-client AND console.developers.google.com SF Python project night Oct 2016: San Francisco, CA GDG NYC meetup Nov 2016: New York, NY Outline ● Overview ● Getting started ● Authorization boilerplate ● Motivational ideas ● Wrap-up ● [hacking + API usage examples]
  • 2.
  • 3.
  • 4.
  • 5.
  • 9.
    OAuth2 scenarios ● Varieson application type (where apps located) ○ Web (server) applications ○ Installed (mobile & desktop computers) apps ○ Service accounts (cloud/server-to-server) ○ Client-side (JavaScript) apps ○ Limited-input devices (game consoles, printers, cameras, etc.) ○ developers.google.com/identity/protocols/OAuth2 ○ TODAY: command-line script == "Installed"
  • 11.
  • 12.
    developers.google.com/discovery/libraries Open source client librariesfor many languages, not just SIMPLE AUTHORIZED Which do you choose?
  • 13.
  • 14.
    Motivational ideas Write yourown or see github.com/googledrive/zipextractor (JS)
  • 15.
    Build a Node.jscustomized reporting tool with our Sheets API codelab at g.co/codelabs/sheets (JS) Check out our Node.js Markdown-to-Google Slides sample app demoing the Slides API github.com/googlesamples/md2googleslides (JS)
  • 16.
  • 17.
    Alternative ● Google AppsScript ○ What is it? ■ Executes as JavaScript in Google's cloud ■ Think “built-in” services vs. traditional API usage ■ Convenient access to G Suite/Google Apps data ■ Can also access other Google+external services ■ developers.google.com/apps-script ○ Video resources ■ developers.google.com/apps-script/guides/videos (intro/Sheets, Maps & Gmail, YouTube [Data], Forms) Summary ● We’ve created great tech but can’t build everything(!) ● APIs: our tech available for your apps; free?!? ● Access w/favorite dev tool via Google APIs Client Library ○ Python, JavaScript (client + Node.js), Java, C#/.NET, Go, Dart, Ruby, PHP ○ Also mobile: Android (Java), iOS (Swift, Objective-C) ● Build the next great thing!
  • 18.
    Reference ● Blog +video Resources ○ SETUP & BOILERPLATE ■ goo.gl/RbyTFD (new Google APIs project setup) ■ goo.gl/KMfbeK (common Python boilerplate code review) ○ G SUITE APIs ■ goo.gl/ZIgf8k and goo.gl/EySSQV (Google Drive API) ■ goo.gl/pFYUQ2 (Gmail API) ■ goo.gl/KuYMiq (Google Calendar API) ■ goo.gl/N1RPwC and goo.gl/U6Oljn (Google Sheets API) ■ developers.google.com/slides/videos (Google Slides APIs) Thank you! Questions? +Wesley Chun google.com/+WesleyChun @wescpy twitter.com/wescpy slide deck goo.gl/NjCC0H