Skip to content

Latest commit

 

History

History
120 lines (98 loc) · 2.98 KB

README.md

File metadata and controls

120 lines (98 loc) · 2.98 KB

MovieSuggestions

1. Collections / Model

  • Lists

    • moviesId
    • name
    • score
    • posterUri
    • vote
    • _id
    • createdAt
    • updatedAt
  • Movies !!! Object example : https://api.themoviedb.org/3/movie/337167?api_key=7345489e9522a18a9b84bbc90f4d7758&language=en

    • adult
    • backdrop_path
    • belongs_to_collection
      • id
      • name
      • poster_path
      • backdrop_path
    • budget
    • genres
      • id
      • name
    • homepage
    • id
    • imdb_id
    • original_language
    • original_title
    • overview
    • popularity
    • poster_path
    • production_companies
      • id
      • logo_path
      • name
      • origin_country
    • production_countries
      • iso_3166_1
      • name
    • release_date
    • revenue
    • runtime
    • spoken_languages
    • status
    • tagline
    • title
    • video
    • vote_average
    • vote_count

2. Route / RESTful


  • POST -> /api/lists = creat a list

    • Example 1: req.body = {"moviesId": [1,2,3,4,5,6], "name": "List của Dũng"}
    • Example 2: req.body = {"moviesId": [1,2,3], "name": "List của Dũng"}
    • Lưu ý: request phải ở dạng JSON
  • GET -> /api/lists/count = get number of lists in database

  • GET -> /api/lists?page = get infomation of 10 lists (after skip [10 * (page-1)] lists)

  • GET -> /api/lists/top10 = get infomation 10 lists with priority is score

  • GET -> /api/lists/:id = get infomation of 1 list

  • PUT -> /api/lists/:id/ = increase score of req.params.id by req.body.score

3. Cooked Data

  • /api/lists !!! Object example is in ObjectExample1

    • moviesId
    • name
    • score
    • vote
    • posterUri
    • _id
  • /api/movies !!! Object example is in ObjectExample2

    • genres
      • id
      • name
    • homepage
    • id
    • overview
    • posterUri
    • release_date
    • title
    • vote_average
    • actor
      • character
      • name
      • profileUri

4. API Link