Releases: prdickson/python-code-test
Releases · prdickson/python-code-test
Completed version
Implementaion notes / assumptions:
- The api is available on /api, requesting with a content type of text/html renders the documentation.
- There are three urls of interest, /api/starships, /api/listings and /api/listings/
- The requirements are quite vague, it is a little unclear what the starship model represents. Is it a type as referred to by listing model or a ship as indicated by the requirements? The latter is assumed.
- The starship model appeared incomplete, name and model fields were added.
- Added created and active fields to the listing model.
- Assumed the name of the listing is the title of the listing, 'e.g. Partially completed Death Star for sale' rather than the ship name.
- The standard django rest framework documentenation seems pretty good for this exercise, so I didn't include a third party documentation generator like Swagger.
- A management command (import_starships) was used to import from the star wars api as this didn't seem like an API function.
- The minimum api footprint was exposed to complete the requirements, e.g. there is no way to retrieve a listing by id or a way to update the listing name.
- The requirements stated that creating a listing requires ship name and price. This was interpreted as requiring listing name, starship id and price.
- Concerns around scalability, such as pagination and caching, have been ignored for this exercise.