hummingbird-me / kitsu-tools

:hammer: The tools we use to build Kitsu, the coolest platform for anime and manga
https://kitsu.app
Apache License 2.0
2.09k stars 265 forks source link

APIv1 Can't get hentai titles on search #631

Closed Gargadon closed 9 years ago

Gargadon commented 9 years ago

Seems to be a NSFW filter in anime search query? I tried to get as an example "Bible Black", using "bible" as search parameter, but the only result I got is this: http://hummingbird.me/api/v1/search/anime?query=bible

[{"id":2067,"mal_id":2282,"slug":"in-the-beginning-the-bible-stories","status":"Finished Airing","url":"https://hummingbird.me/anime/in-the-beginning-the-bible-stories","title":"In The Beginning: The Bible Stories","alternate_title":null,"episode_count":26,"episode_length":24,"cover_image":"https://static.hummingbird.me/anime/poster_images/000/002/067/large/2067.jpg?1408445703","synopsis":"Through the Italian National Broadcasting Network, Tezuka Osamu received an ardent request from the Vatican to make the Bible into animated form. This request was probably made to see how the Bible would be depicted by the non-Christian Tezuka Osamu. Tezuka Osamu accepted the request and spent an entire two years to complete a pilot film. It was about the story of Noah's ark, with the enthusiastic Tezuka Osamu not only writing the scenario but also drawing pictures by himself. During production, however, he unfortunately passed away, so Director Dezaki took over the film and completed it.\r\n(Source: AniDB)","show_type":"TV","started_airing":"1997-04-01","finished_airing":"1997-05-09","community_rating":0.0,"age_rating":null,"genres":[{"name":"Historical"}]}]

Is there a method to get hentai anime on search? I don't care if I need to be logged in order to get those results.

erengy commented 9 years ago

As far as I know, the only way is to send the auth_token for a user who has Adult Content enabled in their settings. Sending a message body for a GET request isn't quite right, but it works. This also happens to be the only way to retrieve private list items.

Gargadon commented 9 years ago

Thank you so much. It worked. I think it's non secure sending the token via GET too, but can't be helped.

erengy commented 9 years ago

To prevent eavesdropping and accidental logging, make sure you use the HTTPS protocol and send the token in the message body rather than appending it to the URL.