Skip to content

League of Comic Geeks

LeagueofComicGeeks(client_id: str, client_secret: str, access_token: str | None = None, timeout: int = 30, cache: SQLiteCache | None = None)

Wrapper to allow calling League of Comic Geeks API endpoints.

PARAMETER DESCRIPTION
client_id

User's Client Id to access League of Comic Geeks.

TYPE: str

client_secret

User's Client Secret to access League of Comic Geeks.

TYPE: str

access_token

User's Access Token to access League of Comic Geeks.

TYPE: str | None DEFAULT: None

timeout

Set how long requests will wait for a response (in seconds).

TYPE: int DEFAULT: 30

cache

SQLiteCache to use if set.

TYPE: SQLiteCache | None DEFAULT: None

ATTRIBUTE DESCRIPTION
headers

Header used when requesting from League of Comic Geeks.

TYPE: Dict[str, str]

timeout

How long requests will wait for a response (in seconds).

TYPE: int

cache

SQLiteCache to use if set.

TYPE: Optional[SQLiteCache]

client_secret

User's Client Secret to access League of Comic Geeks.

TYPE: str

access_token

User's Access Token to access League of Comic Geeks.

TYPE: Optional[str]

Functions

generate_access_token() -> str

Request an access token.

RETURNS DESCRIPTION
str

An access token.

RAISES DESCRIPTION
ServiceError

If there is an issue with the client id or secret.

get_comic(comic_id: int) -> Comic

Request data for a Comic based on its id.

PARAMETER DESCRIPTION
comic_id

The Comic id.

TYPE: int

RETURNS DESCRIPTION
Comic

A Comic object.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

get_series(series_id: int) -> Series

Request data for a Series based on its id.

PARAMETER DESCRIPTION
series_id

The Series id.

TYPE: int

RETURNS DESCRIPTION
Series

A Series object.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.

search(search_term: str) -> list[SearchResult]

Request a list of search results.

PARAMETER DESCRIPTION
search_term

Search query string

TYPE: str

Returns: A list of results.

RAISES DESCRIPTION
ServiceError

If there is an issue with validating the response.