Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchAnime results in bad request #20

Closed
RexfelisLOC opened this issue Sep 21, 2020 · 2 comments
Closed

SearchAnime results in bad request #20

RexfelisLOC opened this issue Sep 21, 2020 · 2 comments

Comments

@RexfelisLOC
Copy link

_jikan.SearchAnime("one piece", 0) results in the following exception message:

"GET request failed. Status code: BadRequest Inner message: System.Net.Http.StreamContent"

@Ervie
Copy link
Owner

Ervie commented Sep 21, 2020

Paging starts from 1, as in the MAL - the first page return first 50 results, the second page from 51 to 100. Please refer to https://github.com/Ervie/jikan.net/wiki/SearchAnime - passing 0 or negative number will result in creation of incorrect endpoint for REST API.

I will probably implement some validation for pre-checking passed parameters and return more descriptive exception messages. For now, just passing 1 instead of 0 should work.

@RexfelisLOC
Copy link
Author

Ah I missed that, thank you.

@Ervie Ervie closed this as completed Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants