swapi
swapi copied to clipboard
Return name in addition to URL array
Hi is it possible to return the resource name of the array elements in addition to the url like when calling:
http://swapi.co/api/films/1/
we get an array of planets, species, starships, vehichles and characters. It would be great if we could receive not only an array of URL like:
["http://swapi.co/api/planets/8/", "http://swapi.co/api/planets/9/", "http://swapi.co/api/planets/1/"]
but also the names of the planets like: ["Naboo", "Coruscant", "Tatooine"]
This has been proposed before, and Django REST Framework supports some nested attributes. Happy to accepted a pull request with the changes so long as it does not change any existing attributes.
This would be great. or event if as parameter or option when doing a query.
For example http://swapi.co/api/people/?shownames=1
@mdhorda, could you do a pull request?