The above image was copied from here.
What is this?
This is an orchestration of calls to the Star Wars API (SWAPI). The goal is to provide aassociated metadata from SWAPI endpoints with one request.
The SWAPI is a great resource for Star Wars information. SWAPI provides endpoints for Star Wars data specific to:
- films
- characters (people)
- species
- vehicles
- starships
This project enables you to make one call to any of these endpoints, and then goes ahead and makes calls to the associated urls for you.
Note that currently all that is returned from calls to the associated urls is the
name
andid
of the value returned
The goal is to have all associated data in one call. Rather than having to walk through the API etc.
This project has the following routes:
/films-list
Provides metadata about all the Star Wars films (episodes 1-7).
/film/:episode
Provides metadata about a specific Star Wars film. Note provide episode
as a parameter.
/people/:id
Provides metadata about a specific Star Wars character. Note provide the SWAPI id of the character as a parameter.
/planet/:id
Provides metadata about a specific Star Wars planet. Note provide the SWAPI id of the planet as a parameter.
/starship/:id
Provides metadata about a specific Star Wars starship. Note provide the SWAPI id of the starship as a parameter.
/vehicle/:id
Provides metadata about a specific Star Wars vehicle. Note provide the SWAPI id of the vehicle as a parameter.
/species/:id
Provides metadata about a specific Star Wars species. Note provide the SWAPI id of the species as a parameter.
This project uses flat-cache for local caching. A future improvement would be to use redis or memcached as a more robust option.
- PR's welcome!
- improve testing
- implement more robust cache mechanism
- provide better overall docs
- increase the amount of information returned from the bundled calls (currently only returns the
name
andid
from the SWAPI records)