Skip to content

Commit ae310b1

Browse files
authored
Merge pull request #4 from Snayt1k3/dev
GraphQL endpoint
2 parents 8cef4eb + 4da4342 commit ae310b1

File tree

16 files changed

+799
-12
lines changed

16 files changed

+799
-12
lines changed

docs/conf.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
import tomli
66
import os
77
import sys
8-
sys.path.insert(0, os.path.abspath('..'))
8+
9+
sys.path.insert(0, os.path.abspath(".."))
910
# -- Project information -----------------------------------------------------
1011
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1112
with open("../pyproject.toml", "rb") as f:
1213
pyproject = tomli.load(f)
1314

1415
_version: str = pyproject["tool"]["poetry"]["version"]
15-
project = 'shiki.py'
16-
copyright = '2024, Snayt1k3'
17-
author = 'Snayt1k3'
16+
project = "shiki.py"
17+
copyright = "2024, Snayt1k3"
18+
author = "Snayt1k3"
1819

1920
release = _version
2021
version = ".".join(_version.split(".", 2)[:2])
@@ -37,13 +38,13 @@
3738
"sphinx_search.extension",
3839
]
3940

40-
templates_path = ['_templates']
41+
templates_path = ["_templates"]
4142
exclude_patterns = []
4243

4344
# -- Options for HTML output -------------------------------------------------
4445
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
4546
html_theme = "furo"
46-
html_static_path = ['_static']
47+
html_static_path = ["_static"]
4748
autodoc_default_options = {"member-order": "bysource"}
4849
intersphinx_mapping = {
4950
"py": ("https://docs.python.org/3", None),

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
def get_long_description() -> str:
1212
return (Path(__file__).parent / "README.md").read_text()
1313

14+
1415
extra_requirements = {
1516
"readthedocs": [
1617
"furo",

shikimori/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ def __init__(
142142
self.video = endpoints.VideosEndpoint(**self._deps)
143143
"""Endpoint for making requests to the URL 'https://shikimori.one/api/animes/:anime_id/videos'"""
144144
self.auth = Auth(self._limiter, self._user_agent, self._options, self._base_url)
145+
"""Endpoint for OAUTH"""
146+
self.graphql = endpoints.GraphQlEndpoint(**self._deps)
147+
"""Endpoint for making requests to the URL 'https://shikimori.one/api/grapql with your fields'"""
145148

146149
def set_token(self, token: str) -> None:
147150
"""

shikimori/endpoints/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
from .user_rates import UserRatesEndpoint
3232
from .users import UserEndpoint
3333
from .videos import VideosEndpoint
34+
from .grapql import GraphQlEndpoint
3435

3536
__all__ = [
3637
"AbuseRequestEndpoint",
38+
"GraphQlEndpoint",
3739
"AchievementsEndpoint",
3840
"AnimeEndpoint",
3941
"AppearsEndpoint",

shikimori/endpoints/episode_notifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def notify(
2222
) -> EpisodeNotification | RequestError:
2323
"""
2424
Notify shikimori about anime episode release.
25-
25+
2626
:param token: Private token required to access this api
2727
:param anime_id: Must be a number.
2828
:param episode: Must be a number.

0 commit comments

Comments
 (0)