Skip to content

Commit

Permalink
Merge pull request #4 from Snayt1k3/dev
Browse files Browse the repository at this point in the history
GraphQL endpoint
  • Loading branch information
Snayt1k3 authored May 28, 2024
2 parents 8cef4eb + 4da4342 commit ae310b1
Show file tree
Hide file tree
Showing 16 changed files with 799 additions and 12 deletions.
13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
import tomli
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
with open("../pyproject.toml", "rb") as f:
pyproject = tomli.load(f)

_version: str = pyproject["tool"]["poetry"]["version"]
project = 'shiki.py'
copyright = '2024, Snayt1k3'
author = 'Snayt1k3'
project = "shiki.py"
copyright = "2024, Snayt1k3"
author = "Snayt1k3"

release = _version
version = ".".join(_version.split(".", 2)[:2])
Expand All @@ -37,13 +38,13 @@
"sphinx_search.extension",
]

templates_path = ['_templates']
templates_path = ["_templates"]
exclude_patterns = []

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "furo"
html_static_path = ['_static']
html_static_path = ["_static"]
autodoc_default_options = {"member-order": "bysource"}
intersphinx_mapping = {
"py": ("https://docs.python.org/3", None),
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
def get_long_description() -> str:
return (Path(__file__).parent / "README.md").read_text()


extra_requirements = {
"readthedocs": [
"furo",
Expand Down
3 changes: 3 additions & 0 deletions shikimori/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def __init__(
self.video = endpoints.VideosEndpoint(**self._deps)
"""Endpoint for making requests to the URL 'https://shikimori.one/api/animes/:anime_id/videos'"""
self.auth = Auth(self._limiter, self._user_agent, self._options, self._base_url)
"""Endpoint for OAUTH"""
self.graphql = endpoints.GraphQlEndpoint(**self._deps)
"""Endpoint for making requests to the URL 'https://shikimori.one/api/grapql with your fields'"""

def set_token(self, token: str) -> None:
"""
Expand Down
2 changes: 2 additions & 0 deletions shikimori/endpoints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
from .user_rates import UserRatesEndpoint
from .users import UserEndpoint
from .videos import VideosEndpoint
from .grapql import GraphQlEndpoint

__all__ = [
"AbuseRequestEndpoint",
"GraphQlEndpoint",
"AchievementsEndpoint",
"AnimeEndpoint",
"AppearsEndpoint",
Expand Down
2 changes: 1 addition & 1 deletion shikimori/endpoints/episode_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def notify(
) -> EpisodeNotification | RequestError:
"""
Notify shikimori about anime episode release.
:param token: Private token required to access this api
:param anime_id: Must be a number.
:param episode: Must be a number.
Expand Down
Loading

0 comments on commit ae310b1

Please sign in to comment.