Client

class Shikimori(*, user_agent: str = None, client_id: str = None, client_secret: str = None, redirect_uri: str = 'urn:ietf:wg:oauth:2.0:oob', scopes: list[str] = None, base_url: str = None, logging: int | bool = None, raise_on_error: bool = False)

Main class for interacting with the Shikimori API.

This class provides methods and endpoints for working with various features of the Shikimori API, such as anime, manga, users, forums, etc.

__init__(*, user_agent: str = None, client_id: str = None, client_secret: str = None, redirect_uri: str = 'urn:ietf:wg:oauth:2.0:oob', scopes: list[str] = None, base_url: str = None, logging: int | bool = None, raise_on_error: bool = False)

Initialize client for working with the Shikimori API.

Parameters:
  • user_agent – User-agent string to be used in API requests.

  • client_id – Client ID for OAuth authentication.

  • client_secret – Client secret for OAuth authentication.

  • scopes – Scopes for OAuth authentication.

  • redirect_uri – Redirect URI for OAuth authentication. Defaults to “urn:ietf:wg:oauth:2.0:oob”.

  • base_url – Base URL for the Shikimori API. Defaults to None.

  • logging – Logging level for debug information. If True, debug logging is enabled. If False, logging is disabled. Defaults to None.

  • raise_on_error – If true RequestError will be raised else return

Raises:

ValueError: If user_agent is not specified.

abuseRequest

Endpoint for making requests to the URL ‘https://shikimori.one/api/v2/abuse_requests/

achievement

Endpoint for making requests to the URL ‘https://shikimori.one/api/achievements

anime

Endpoint for making requests to the URL ‘https://shikimori.one/api/animes

appear

Endpoint for making requests to the URL ‘https://shikimori.one/api/appears

ban

Endpoint for making requests to the URL ‘https://shikimori.one/api/bans

calendar

Endpoint for making requests to the URL ‘https://shikimori.one/api/calendar

character

Endpoint for making requests to the URL ‘https://shikimori.one/api/characters/

club

Endpoint for making requests to the URL ‘https://shikimori.one/api/clubs

comment

Endpoint for making requests to the URL ‘https://shikimori.one/api/comments

constant

Endpoint for making requests to the URL ‘https://shikimori.one/api/constants/anime

dialog

Endpoint for making requests to the URL ‘https://shikimori.one/api/dialogs

episodeNotification

Endpoint for making requests to the URL ‘https://shikimori.one/api/v2/episode_notifications

favorite

Endpoint for making requests to the URL ‘https://shikimori.one/api/favorites/

forum

Endpoint for making requests to the URL ‘https://shikimori.one/api/forums

friend

Endpoint for making requests to the URL ‘https://shikimori.one/api/friends/:id

genre

Endpoint for making requests to the URL ‘https://shikimori.one/api/genres

manga

Endpoint for making requests to the URL ‘https://shikimori.one/api/mangas

message

Endpoint for making requests to the URL ‘https://shikimori.one/api/messages/

people

Endpoint for making requests to the URL ‘https://shikimori.one/api/people/:id

publisher

Endpoint for making requests to the URL ‘https://shikimori.one/api/publishers

ranobe

Endpoint for making requests to the URL ‘https://shikimori.one/api/ranobe

review

Endpoint for making requests to the URL ‘https://shikimori.one/api/reviews

stats

Endpoint for making requests to the URL ‘https://shikimori.one/api/stats/active_users

studio

Endpoint for making requests to the URL ‘https://shikimori.one/api/studios

style

Endpoint for making requests to the URL ‘https://shikimori.one/api/styles/

topicIgnore

Endpoint for making requests to the URL ‘https://shikimori.one/api/v2/topics/

topic

Endpoint for making requests to the URL ‘https://shikimori.one/api/topics

userIgnore

Endpoint for making requests to the URL ‘https://shikimori.one/api/v2/users/:user_id/ignore

userImage

Endpoint for making requests to the URL ‘https://shikimori.one/api/user_images

userRate

Endpoint for making requests to the URL ‘https://shikimori.one/api/v2/user_rates/

user

Endpoint for making requests to the URL ‘https://shikimori.one/api/users

video

Endpoint for making requests to the URL ‘https://shikimori.one/api/animes/:anime_id/videos

auth

Endpoint for OAUTH

graphql

Endpoint for making requests to the URL ‘https://shikimori.one/api/grapql with your fields’

set_token(token: str) None

Set OAuth token for authentication.

Parameters:

token – OAuth token to be set.