MyMovies – sample app which uses TMDB API
RSpec documentation:
fc -l -10
cat ~/.railsrc
--skip-bundle
--no-test-framework
--skip-test-unit
rails new my_movies
cd my_movies/
# add rspec-rails, capybara, database_cleaner, and themoviedb gems to Gemfile
gem list rspec
bundle install
mv README.rdoc README.md
rails g rspec:install
The Movie Database API
- Movie & TV API Overview
- wrappers libraries
- themoviedb – a Ruby wrapper for the The Movie Database API
Example:
bin/tmdb
fc -l -4
rails g controller Home index
rails g controller Search index
rails g controller Movies show
rails g controller People show
Initializers
Tmdb::Api.key(ENV['TMDB_API_KEY'])
Tmdb::Api.language("en") # setup your default language
Routing
Rails.application.routes.draw do
resources :movies, only: :show
resources :people, only: :show
match "search", to: "search#index", via: :get
# You can have the root of your site routed with "root"
root 'home#index'
end
Things you may want to cover
This README would normally document whatever steps are necessary to get the application up and running:
- Ruby version
- System dependencies
- Configuration
- Database creation
- Database initialization
- How to run the test suite
- Services (job queues, cache servers, search engines, etc.)
- Deployment instructions