Slide 1

Slide 1 text

Hello World Automatic API Automatic Lunch & Learn Sep 17, 2014

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Automatic API REST Webhook User requested “Give me all of the trips for this user between these dates” Sent by Automatic “This user finished a trip just now, here it is”

Slide 4

Slide 4 text

REST Webhook Automatic API TripViewer Automaticator

Slide 5

Slide 5 text

Automatic API • Trips • Vehicles • User Info • Events REST Endpoints

Slide 6

Slide 6 text

Trips Endpoint GET https://api.automatic.com/v1/trips curl -H "Authorization: token YOUR-OAUTH-TOKEN" "https://api.automatic.com/v1/trips"

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Authorization https://www.automatic.com/developer/dashboard/

Slide 9

Slide 9 text

Authorization https://www.automatic.com/developer/dashboard/

Slide 10

Slide 10 text

Authorization (quick way) https://dashboard.automatic.com/ • Login • Open Developer Console • sessionStorage.accessToken 9386f14f3e289feab41e2c1a577a1ba5e3215166

Slide 11

Slide 11 text

Sample App https://github.com/automatic/tripviewer • Handles oAuth • Fetches trips • Easy to deploy

Slide 12

Slide 12 text

Requirements • Git • Node.js • Text editor https://gist.github.com/brendannee/a8d07f76a485710a560e

Slide 13

Slide 13 text

Hello World Automatic API git clone https://github.com/Automatic/tripviewer.git cd tripviewer npm install cp config-sample.json config.json TOKEN=YOUR-AUTOMATIC-ACCESS-TOKEN npm start Open http://localhost:3000 in your browser

Slide 14

Slide 14 text

Text Editor https://atom.io/

Slide 15

Slide 15 text

Editing Text public/javascripts/summary.js views/summary.jade

Slide 16

Slide 16 text

• Read developer documentation https://automatic.com/developer/documentation • Try out Automaticator App https://github.com/automatic/automaticator • Ask me questions Next Steps