Skip to content

Instantly share code, notes, and snippets.

@stujo
Last active August 31, 2015 18:07
Show Gist options
  • Save stujo/40428b923ae8c805452b to your computer and use it in GitHub Desktop.
Save stujo/40428b923ae8c805452b to your computer and use it in GitHub Desktop.

#Building APIs

#Overview

  • What is an API?
  • Why build an API?
    • Who is going to use it?
    • What are they going to do?
  • REST Architecture
    • Stateless
    • Resource Representations
    • Client Server
    • URIs
  • Richardson Maturity Model (RESTful Routing)
    • 0 - RPC
    • 1 - Resources (have specific urls)
    • 2 - Verbs and Response Codes
    • 3 - HATEOAS - Self Describing
      • Hypertest as the Engine of Application State????
      • Links to available functionality in Responses
  • Data Formats - Params, JSON, XML
  • Error Handling
    • Status Codes
    • Error Messaging
  • Authentication
    • Open
    • Client Tokens (Often ID + Secret)
    • In Headers
  • Consumption: Google GeoCode Example
  • Providing: Playlist
  • Challenge Prep
  • Review

#What is an API?

#Consumption: Google GeoCode Example

  • geolocate
  • Secure Your Tokens - DONT CHECK THEM IN!
    • dotenv - .env file
    • YAML.load() - in *.yml

#Providing: Playlist

#Challenge Prep

#Review

  • API is an Application Programming Interface
  • For Web Applications:
    • JSON reponses to params or JSON body requests
  • Consumption either Server Side or Client Side
  • Providing: PetWorld
  • Challenge Prep

#Related Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment