This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
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
-
...
MovieMaze is an app to to look up a movie, see it's information, and see what streaming services it's available on. This is the custom API that feeds the MoveMaze App (Live -- Repo )
-
Fork or clone this repo:
git clone git@github.com:Kate-v2/MovieMaze.git <name of your choice>
-
Install Dependencies:
bundle install
-
Install Figaro to store secret environmental variables:
-
bundle exec figaro install
--> providesconfig/application.yml
-
Get and API token from Utelly
-
Add each token to
application.yml
under bothtest:
&development:
-
uttely_key: YOUR TOKEN HERE
-
omdb_key: YOUR TOKEN HERE
-
Make sure you add these ENV variables to your deployment service.
-
To see the app in action locally:
rails s
then go to:http://localhost:3000/
-
Setup database
bundle exec rake db:{create,migrate}
This app obtains data through:
- Use MovieMaze API
- New User: POST https://movie-maze.herokuapp.com/users
Headers:
Content-type: application/json
Accept: application/json
Body:
{
"username": "name",
"password": "pw",
"password_confirmation": "pw",
"email": "email"
}
Response
status: 201
Body:
{
"data": {
"id": "100",
"type": "new_user",
"attributes": {
"id": 100,
"token": "xyz123"
}
}
}
- Login User: POST https://movie-maze.herokuapp.com/sessions
Headers:
Content-type: application/json
Accept: application/json
Body:
{
"username": "name",
"password": "pw"
}
Response
status: 200
Body:
{
"data": {
"id": "100",
"type": "login",
"attributes": {
"id": 100,
"token": "xyz123"
}
}
}
- Search Movie Titles GET https://movie-maze.herokuapp.com/api/v1/search
Headers:
Content-type: application/json
Accept: application/json
Body:
{
"term": "bojack"
}
Response
status: 200
Body:
{
"data": {
"id": "0",
"type": "movie_search_results",
"attributes": {
"id": 0,
"term": "bojack",
"results": [
{
"title": "BoJack Horseman",
"picture": "https://utellyassets2-9.imgix.net/2/Open/TMDB4_2462/Misc/5u3Y2HpD0wlK697lnpvNn6h5lYK.jpg?fit=crop&auto=compress&crop=faces,top",
"streams": [
{
"service": "Netflix",
"url": "https://www.netflix.com/title/70300800"
}
]
},
{
"title": "Dragon Ball Z: Bojack Unbound",
"picture": "https://utellyassets2-9.imgix.net/2/Open/MovieDB_2462/Program/19828569/_9by13/19828569_PA_DragonBallZBojackUnbound.jpg?fit=crop&auto=compress&crop=faces,top",
"streams": [
{
"service": "iTunes",
"url": "https://itunes.apple.com/us/movie/dragon-ball-z-bojack-unbound/id1371978171?uo=5&at=1l3v7yf"
}
]
},
{
"title": "BoJack Horseman Christmas Special: Sabrina's Christmas Wish",
"picture": null,
"streams": [
{
"service": "Netflix",
"url": "https://www.netflix.com/title/80019503"
}
]
}
]
}
}
}
- Search Movie Details GET https://movie-maze.herokuapp.com/api/v1/movie
Headers:
Content-type: application/json
Accept: application/json
Body:
{
"title": "bojack"
}
Response
status: 200
Body:
{
"data": {
"id": "0",
"type": "movie",
"attributes": {
"id": 0,
"details": {
"Title": "BoJack Horseman",
"Year": "2014–",
"Rated": "TV-MA",
"Runtime": "25 min",
"Genre": "Animation, Comedy, Drama",
"Director": "N/A",
"Actors": "Will Arnett, Amy Sedaris, Alison Brie, Aaron Paul",
"Plot": "BoJack Horseman was the star of the hit TV show \"Horsin' Around\" in the '90s, now he's washed up, living in Hollywood, complaining about everything, and wearing colorful sweaters.",
"Awards": "Nominated for 1 Primetime Emmy. Another 7 wins & 20 nominations.",
"Poster": "https://m.media-amazon.com/images/M/MV5BNzgzNzg3MDkyOF5BMl5BanBnXkFtZTgwOTk5MjAzNjM@._V1_SX300.jpg",
"imdbRating": "8.5/10",
"Type": "series"
}
}
}
}
- To run tests use
bundle exec rspec
- To open coverage (via simplecov gem)
open coverage/index.html
after you run the tests
- Incorporate suggestions for user
- Incorporate suggestions on each movie page - TasteDive API
- Add a watched button
- Data Visualization for
watched this month
&watched vs liked
To contribute, see the setup instructions.
- Open Issues
- Create a new branch describing the feature. If you close an issue, include it's number in the branch name.
- Please describe all changes in the Pull Request (to
Master
), and all relative issue cards/actions. - Please use the Pull Request Template as the baseline for communication - feel free to add more!
- Please update the
README
if anything is affected.
Ruby '2.4.1'
Rails '~> 5.2.2'
- PostgreSQL for database
'rspec-rails', '~> 3.8'
for testing- Travis CI
- Heroku
- See Gemfile for specific gems