-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: AniList.get() now accepts every parameter accepted by anilist (#…
…21) * feat!: AniList.get() now accepts every parameter accepted by anilist BREAKING CHANGE: .search() is removed because it was redundant * chore: remove redundant test, add new tests * chore: format * fix: workaround pydantic bug * docs: update * fix: async client
- Loading branch information
1 parent
4523099
commit 8ee775d
Showing
30 changed files
with
1,690 additions
and
1,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,2 @@ | ||
::: pyanilist.AniList | ||
options: | ||
members: | ||
- __init__ | ||
- search | ||
- get | ||
|
||
|
||
::: pyanilist.AsyncAniList | ||
options: | ||
members: | ||
- __init__ | ||
- search | ||
- get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,31 @@ | ||
::: pyanilist._enums.BaseStrEnum | ||
::: pyanilist._enums.CharacterRole | ||
options: | ||
members: true | ||
::: pyanilist._enums.ExternalLinkType | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaFormat | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaRankType | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaRelation | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaSeason | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaSort | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaSource | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaStatus | ||
::: pyanilist._enums.MediaType | ||
options: | ||
members: true | ||
::: pyanilist._enums.MediaType | ||
options: | ||
members: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,4 @@ | ||
!!! note | ||
PyAniList simply re-exports exceptions from | ||
[`httpx`](https://www.python-httpx.org/exceptions/) and | ||
[`pydantic`](https://docs.pydantic.dev/latest/api/pydantic_core/#pydantic_core.ValidationError) for convenience. | ||
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._exceptions.CloseError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ConnectError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ConnectTimeout | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.CookieConflict | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.DecodingError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.HTTPError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.HTTPStatusError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.InvalidURL | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.LocalProtocolError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.NetworkError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.PoolTimeout | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ProtocolError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ProxyError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ReadError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ReadTimeout | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.RemoteProtocolError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.RequestError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.RequestNotRead | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ResponseNotRead | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.StreamClosed | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.StreamConsumed | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.StreamError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.TimeoutException | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.TooManyRedirects | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.UnsupportedProtocol | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.WriteError | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.WriteTimeout | ||
options: | ||
show_source: false | ||
members: false | ||
::: pyanilist._exceptions.ValidationError | ||
options: | ||
show_source: false | ||
members: false | ||
- `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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
!!! note | ||
Additionally, PyAniList also uses and exports the following [pydantic](https://docs.pydantic.dev/latest/) types for convenience: | ||
|
||
- [HttpUrl](https://docs.pydantic.dev/latest/api/networks/#pydantic.networks.HttpUrl) | ||
|
||
- [Color](https://docs.pydantic.dev/latest/api/pydantic_extra_types_color/#pydantic_extra_types.color.Color) | ||
|
||
- [CountryAlpha2 as CountryCode](https://docs.pydantic.dev/latest/api/pydantic_extra_types_country/#pydantic_extra_types.country.CountryAlpha2) | ||
|
||
::: pyanilist._types.AniListID | ||
::: pyanilist._types.AniListTitle | ||
::: pyanilist._types.AniListYear | ||
::: pyanilist._types.YearsActive | ||
::: pyanilist._types.HTTPXAsyncClientKwargs | ||
::: pyanilist._types.HTTPXClientKwargs | ||
options: | ||
members: true | ||
::: pyanilist._types.FuzzyDateInt | ||
::: pyanilist._types.Iterable |
Oops, something went wrong.