javserlah / qforce

QForce
0 stars 0 forks source link

QForce

The QForce REST API returns Star Wars characters. It uses the https://swapi.co/ to retrieve the actual Star Wars characters.

Objective

Create a REST endpoint to search Star Wars characters by name or retrieve them by id.

The endpoint should look like:

The search endpoint should return a list of Person resources.

The Person resource should look like:

{
  "id": 1,
  "name": "Luke Skywalker",
  "birth_year": "19BBY",
  "gender": "MALE",
  "height": 172,
  "weight": 77,
  "movies": [
    {
      "title": "The Empire Strikes Back",
      "episode": 5,
      "director": "Irvin Kershner",
      "release_date": "1980-05-17"
    },
    ..
  ]
}

The get endpoint should return a single Person resource and if the id does not exists it should return a 404.

The api should write analytics to a (embedded) database to keep track how many times the api is called.

Requirements