Skip to content

Commit

Permalink
docs: misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravencentric committed Jul 6, 2024
1 parent 0c3828a commit 44c310e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api-reference/exceptions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PyAniList doesn't raise any custom exceptions of it's own. The two most likely errors you'll encounter will be either of these:
`pyanilist` doesn't raise any custom exceptions of it's own. The two most likely errors you'll encounter will be either of these:

- `pyanilist.HTTPStatusError` - Alias for [`httpx.HTTPStatusError`](https://www.python-httpx.org/exceptions/). Raised if a request returns a non 2xx status code.
- `pyanilist.ValidationError` - Alias for [`pydantic.ValidationError`](https://docs.pydantic.dev/latest/errors/validation_errors/). Raised if an input is invalid.
4 changes: 3 additions & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ print(media.episodes)

```py
from pyanilist import AniList, MediaSeason, MediaType, MediaStatus, MediaFormat

media = AniList().get(
"My Hero Academia",
season=MediaSeason.SPRING,
Expand All @@ -42,6 +43,7 @@ media = AniList().get(
status=MediaStatus.FINISHED,

)

print(media.title.romaji)
#> Boku no Hero Academia
print(media.start_date.iso_format())
Expand Down Expand Up @@ -89,7 +91,7 @@ print(main_characters)

## Retries

AniList API is flaky, sometimes it might return an error for a perfectly valid request. `pyanilist` handles this by simply retrying failed requests a specified number of times (default is 5) before raising an error. Every subsequent retry also adds an additional delay between requests.
AniList API is flaky, sometimes it might return an error for a perfectly valid request. `pyanilist` handles this by simply retrying failed requests a specified number of times (default is 5) before raising an error.

```py
from pyanilist import AniList
Expand Down

0 comments on commit 44c310e

Please sign in to comment.