#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?
- API is an Application Programming Interface
- Twitter Documentation
#Consumption: Google GeoCode Example
- geolocate
- Secure Your Tokens - DONT CHECK THEM IN!
dotenv
-.env
fileYAML.load()
- in*.yml
#Providing: Playlist
- RESTish - CRUD
- Richardson Maturity Model
- Richardson Maturity Model - extra
- HTTP Methods and Verbs
- JSON +?
- Only Provide what you need
- For External or Internal Use
- Authentication
- Talk about OAuth Later
- Key
- Exchange AppID and Secret for Token
- Header vs Param
- Often served over HTTPS
- Sinatra Moduluar Configuration - check it out
- Google GeoCoder
- Postman Collection for Pet World
#Challenge Prep
- Challenge is to BUILD an API
- /build_an_api_challenge
- Postman Chrome Extension
- Playlist Example V02 only!
#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