- What is an API?
curl
- Code Along with
HTTParty
- Access Tokens
- Testing API calls
curl -v https://api.github.com/emojis
app.rb
- Spec - Use Case
- User can visit
/
to see a list of github emojis
- User can visit
- Read the API docs
- API is an interface for Applications to use
- JSON
- HTTP GET,POST,etc.
- RESTful routing
- Tools to poke at APIs
curl
- command line- Postman REST Client - chrome
- Using APIs in your Applications
- HTTParty in
ruby
apps
- HTTParty in
- Access Tokens
- Like a Username and Password
- Identify you as acting on behalf of a specific user
- Can have specific permissions
- Can be revoked
- What OAuth gives you
- Testing API calls
- Stubbing API calls
- thoughtbot - how-to-stub-external-services-in-tests
gem 'webmock'
require 'webmock/rspec'