marvel-search
We will need a web server that will answer these questions:
- Which Marvel movies did each actor play in? tests
- Actors who played more than one Marvel character? tests
- BONUS – Are there 2 different actors who played the same role? tests
in order to make the BONUS work with the suggested list of people a role/character name sanitization is necesary. To see the filter work the flag
config.filter_cast_with_people
is set tofalse
by default. To use only the people in the list it can be set to true.
API
base path: /api/v1
GET
/actors
Get a list of all the actors with the movies they appear in, and the characters they played.
query params
name | required | type | description |
---|---|---|---|
characters_played | no | number | filter result to actors who played the same or more of the characters specified. |
response
[
{
"slug": "ioan-gruffudd",
"name": "Ioan Gruffudd",
"movies": [
{
"name": "Fantastic Four",
"characters": [
"Reed Richards / Mr. Fantastic"
]
},
{
"name": "Fantastic Four: Rise of the Silver Surfer",
"characters": [
"Reed Richards / Mr. Fantastic"
]
}
],
"characters": [
{
"name": "Reed Richards / Mr. Fantastic",
"movies": [
"Fantastic Four",
"Fantastic Four: Rise of the Silver Surfer"
]
}
]
}
]
GET
/characters
Get a list of all the characters in the MCU with the actors that played them.
query params
name | required | type | description |
---|---|---|---|
played_by_actors | no | number | filter the characters to those played by (or more than) the actors specified in parameter. |
response
[
{
"name": "Reed Richards / Mr. Fantastic",
"actors": [
"ioan-gruffudd",
"miles-teller"
]
},
{
"name": "Sue Storm / Invisible Woman",
"actors": [
"jessica-alba",
"kate-mara"
]
}
]
Development
get started
install dependencies
npm i
start server
npm start
run unit tests
npm run test
run e2e tests
npm start
npm run e2e