/MovieMaze_API

Mod 4 - Solo Project - custom API combining data from other APIs

Primary LanguageRuby

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

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 )

Check it in action!

Setup

  1. Fork or clone this repo: git clone git@github.com:Kate-v2/MovieMaze.git <name of your choice>

  2. Install Dependencies: bundle install

  3. Install Figaro to store secret environmental variables:

  4. bundle exec figaro install --> provides config/application.yml

  5. Get and API token from Utelly

  6. Add each token to application.yml under both test: & development:

  7. uttely_key: YOUR TOKEN HERE

  8. omdb_key: YOUR TOKEN HERE

  9. Make sure you add these ENV variables to your deployment service.

  10. To see the app in action locally: rails s then go to: http://localhost:3000/

  11. Setup database bundle exec rake db:{create,migrate}

APIs, Data, Services

This app obtains data through:

How to Use

  1. Use MovieMaze API
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"
        }
    }
}
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"
        }
    }
}
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"
                        }
                    ]
                }
            ]
        }
    }
}
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"
            }
        }
    }
}

Known Issues

Running Tests

  • To run tests use bundle exec rspec
  • To open coverage (via simplecov gem) open coverage/index.html after you run the tests

Future Goals

  • 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

How to Contribute

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.

Core Unfinished Features

Core Contributors

Technical

Turing Project Details: