Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Successful APIs Overnight!

Nik Wakelin
December 08, 2015

Building Successful APIs Overnight!

Nik Wakelin

December 08, 2015
Tweet

More Decks by Nik Wakelin

Other Decks in Technology

Transcript

  1. D E V E LO PI N G SU CCE

    S S FU L AP I s OVERNIGHT!
  2. D E V E LO PI N G SU CCE

    S S FU L AP I s VIA INCREMENTAL AND SUSTAINED EFFORT OVER MANY MONTHS AND PERHAPS EVEN YEARS!!
  3. (It won’t happen overnight, but it will happen) D E

    V E LO PI N G SU CCE S S FU L AP I s
  4. £THE AP I YO U NEVER BUILD WO N’T CO

    ST YOU ANY MONEY! ¥ €
  5. { "type": "car", "name": "My Ferrari", "cylinders": 512, "options": {

    "seats": 4, "turbospeed": 360 }, "allowedpassengers": { "family": ["Alice", "Bob"], "friends": ["Charlie", "Diana"] } } <car xmlns:xs="http://www.w3.org/2001/XMLSchema"> <name type="xs:string">My Ferrari</name> <cylinders type="xs:int">48</cylinders> <optionals> <seats type="xs:int">4</seats> <turbospeed type="xs:int">360</turbospeed> </optionals> <allowedpassengers> <devices type="xs:list"> <device type="xs:string">cdrom</device> <device type="xs:string">harddisk</device> </allowedpassengers> </boot> </vm> > JSON XML
  6. JSON API http://jsonapi.org { "data": { "type": "cars", "id": "48",

    "attributes": { "seats": 4, "turbospeed": 360 }, "relationships": { "allowedpassengers": { // ... } } } }
  7. { post: { id: 211, title: 'Dog Bites Man', author:

    'Nik Wakelin', _links: [ { rel: 'comments.new', href: 'posts/211/comments/new' } ] } HATEOAS
  8. { message: "Your caffeine level is too low, try a

    double espresso!", more_link: "https://developer.yourapi.com/errors/123" } HTTP 1.1 400 Bad Request
  9. I’ll quickly hack up a client for this custom auth…

    401 401 401 401 401 401 401 401 401 401 401 401 401
  10. "/pet":{ "post":{ "summary":"Add a new pet to the store", "parameters":[

    { "in":"body", "name":"body", "description":"Pet object that needs to be added to the store", "required":true, "schema":{ "$ref":"#/definitions/Pet" } } ], "responses":{ "405":{ "description":"Invalid input" } }, // ... swagger.io
  11. hackathons make sure your devs are there! great way to

    help people fun integrations to tweet
  12. Image Credits Switch from Marcin Wichary on Flickr (https://www.flickr.com/photos/mwichary/2356651346) Blocks

    from Holger Zscheyge on Flickr (https://www.flickr.com/photos/zscheyge/49012397) Unicorn from (https://thenounproject.com/search/?q=unicorn&i=9584) Sign from John McLinden on Flickr (https://www.flickr.com/photos/fogey03/16838534116/) (Bad Photoshop is all me) Unicorn cupcake from kirstin_b on flickr (https://www.flickr.com/photos/kristinausk/4121781145/) Shape Sorter from SpAvAAi on Flickr https://www.flickr.com/photos/spavaai/2536426227/ Disconnected Phone from mrdarkroom on Flickr https://www.flickr.com/photos/mrdarkroom/5357276454 Leaning Tower from Kit on Flickr (https://www.flickr.com/photos/practicalowl/18648955463/) Crane from Nicolás Boullosa on Flickr (https://www.flickr.com/photos/faircompanies/20519433104/) Clown Fish & Blue Tang from Iooyaa on Flickr (https://www.flickr.com/photos/58196275@N04/8636837527/) Cookies from george.bremer on Flickr (https://www.flickr.com/photos/ghbremer/5276304808) ❤
  13. Image Credits Seedling from lev-shine on Flickr https://www.flickr.com/photos/kevinshine/9984357243/) Beer from

    Alan Levine on Flickr (https://www.flickr.com/photos/cogdog/21127813750) Airshow by Pavel N from the Noun Project Abandoned Six Flags from Darrell Miller on Flickr (https://www.flickr.com/photos/darrellrhodesmiller/6904703505) Tui Bird from Cat Burton on Flickr (https://www.flickr.com/photos/catburton/16023893948/) Mailboxes from Olga Caprotti on Flickr (https://www.flickr.com/photos/__olga__/2822660113/) Lock by Michael Martinho from the Noun Project Key by John Caserta from the Noun Project User by Wilson Joseph from the Noun Project Loudhailer from Lis Ferla on flickr (https://www.flickr.com/photos/lastyearsgirl_/3537374056/) Linux Kernel Baby from Harald Groven on flickr (https://www.flickr.com/photos/kongharald/13242684424) Rainbow Tiles from Steve Snodgrass on Flickr (https://www.flickr.com/photos/stevensnodgrass/6807424348) Empty Classroom from KT King on Flickr (https://www.flickr.com/photos/xtrah/4853491803/) Cycle Hire from Kirk Siang on Flickr (https://www.flickr.com/photos/kirksiang/6180888330) ❤