Returns a list of top-rated, recommended films related to the matched film.
GET /films/:film_id/recommendations
Parameters
Name | Type | Description | Default Value |
---|---|---|---|
limit | integer | (optional) The desired number of results returned. | 10 |
offset | integer | (optional) Specifies the first entry to be returned from the collection. | 1 |
Successful Response
{
"recommendations" : [
{
"id": 109,
"title": "Reservoir Dogs",
"releaseDate": "09-02-1992",
"genre": "Action",
"averageRating": 4.2,
"reviews": 202
},
{
"id": 102,
"title": "Jackie Brown",
"releaseDate": "09-15-1997",
"genre": "Action",
"averageRating": 4.1,
"reviews": 404
},
{
"id": 85,
"title": "True Romance",
"releaseDate": "09-25-1993",
"genre": "Action",
"averageRating": 4.0,
"reviews": 165098
}
],
"meta": {
"limit": 10,
"offset": 0
}
}
Failure Response - Use the test suite for guidance on specific error messages.
{
"message" : "Return an explicit error here"
}
The FreshPotatoes API service will be separate from their customer-facing web application. In this repo, you'll find the code that will power their API: starter code and tests built with Node, Express, Mocha, SQLite, and Sequelize.
- Once you’ve cloned, install the node modules:
$ npm install
- Then, run your application:
$ npm start
- To run integration tests, run:
$ npm test