Skip to content

Commit

Permalink
feat!: AniList.get() now accepts every parameter accepted by anilist
Browse files Browse the repository at this point in the history
BREAKING CHANGE: .search() is removed because it was redundant
  • Loading branch information
Ravencentric committed Jul 4, 2024
1 parent 4523099 commit 7ed25c1
Show file tree
Hide file tree
Showing 24 changed files with 1,167 additions and 847 deletions.
1 change: 1 addition & 0 deletions docs/api-reference/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
::: pyanilist._enums.MediaRankType
::: pyanilist._enums.MediaRelation
::: pyanilist._enums.MediaSeason
::: pyanilist._enums.MediaSort
::: pyanilist._enums.MediaSource
::: pyanilist._enums.MediaStatus
::: pyanilist._enums.MediaType
119 changes: 3 additions & 116 deletions docs/api-reference/exceptions.md
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.
15 changes: 1 addition & 14 deletions docs/api-reference/types.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
!!! 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
::: pyanilist._types.FuzzyDateInt
5 changes: 1 addition & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ plugins:
options:
allow_inspection: false
docstring_style: numpy
members: true
show_root_heading: true
show_root_full_path: false
show_signature_annotations: true
Expand All @@ -56,9 +55,7 @@ plugins:
show_symbol_type_toc: true
signature_crossrefs: true
merge_init_into_class: true
preload_modules:
- httpx
- pydantic
filters: ["!^_", "^__init__$"]

markdown_extensions:
- md_in_html
Expand Down
Loading

0 comments on commit 7ed25c1

Please sign in to comment.