janaipakos / ghibliapi

A simple API for Studio Ghibli resources. Unofficial/fan-made
https://ghibliapi.herokuapp.com
MIT License
310 stars 109 forks source link

api iconsistency #14

Open Holmeron opened 6 years ago

Holmeron commented 6 years ago

When fetching curl -X GET -H "Content-Type: application/json" https://ghibliapi.herokuapp.com/people/34277bec-7401-43fa-a00a-5aee64b45b08 it returns { "id": "34277bec-7401-43fa-a00a-5aee64b45b08", "name": "Eboshi", "gender": "Female", "age": "Unspecified/Adult", "eye_color": "Hazel", "hair_color": "Black", "films": [ "https://ghibliapi.herokuapp.com/films/0440483e-ca0e-4120-8c50-4c8cd9b965d6" ], "species": "https://ghibliapi.herokuapp.com/species/af3910a6-429f-4c74-9ad5-dfe1c4aa04f2", "url": "https://ghibliapi.herokuapp.com/people/34277bec-7401-43fa-a00a-5aee64b45b08" }

it returns an array of films, with one link, but a string for species. It's a very low priority issue, and I locally handle the issue, but I guess the fewer iconsistencies, the better.

Holmeron commented 6 years ago

I found another one : curl -X GET -H "Content-Type: application/json" https://ghibliapi.herokuapp.com/locations/42f787d8-1fcb-4d3d-82f2-a74409869368

returns "url": [ "https://ghibliapi.herokuapp.com/locations/42f787d8-1fcb-4d3d-82f2-a74409869368" ] instead of a string

Holmeron commented 6 years ago

I have another issue, but I don't know if it's an issue. Looks like it though :

curl -X GET -H "Content-Type: application/json" https://ghibliapi.herokuapp.com/films/45204234-adfd-45cb-a505-a8e7a676b114 { "id": "45204234-adfd-45cb-a505-a8e7a676b114", "title": "My Neighbors the Yamadas", "description": "The Yamadas are a typical middle class Japanese family in urban Tokyo and this film shows us a variety of episodes of their lives. With tales that range from the humourous to the heartbreaking, we see this family cope with life's little conflicts, problems and joys in their own way.", "director": "Isao Takahata", "producer": "Toshio Suzuki", "release_date": "1999", "rt_score": "75", "people": [ "https://ghibliapi.herokuapp.com/people/" ], "species": [ "https://ghibliapi.herokuapp.com/species/af3910a6-429f-4c74-9ad5-dfe1c4aa04f2" ], "locations": [ "https://ghibliapi.herokuapp.com/locations/" ], "vehicles": [ "https://ghibliapi.herokuapp.com/vehicles/" ], "url": "https://ghibliapi.herokuapp.com/films/45204234-adfd-45cb-a505-a8e7a676b114" }

species is correct, returning an array of links, but locations, vehicles and people just return the route of their list

janaipakos commented 6 years ago

Thanks for pointing this out. The species string is intentional but the other issues are bugs/inconsistencies