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:
|
client_secret |
User's Client Secret to access League of Comic Geeks.
TYPE:
|
access_token |
User's Access Token to access League of Comic Geeks.
TYPE:
|
timeout |
Set how long requests will wait for a response (in seconds).
TYPE:
|
cache |
SQLiteCache to use if set.
TYPE:
|
ATTRIBUTE | DESCRIPTION |
---|---|
headers |
Header used when requesting from League of Comic Geeks.
TYPE:
|
timeout |
How long requests will wait for a response (in seconds).
TYPE:
|
cache |
SQLiteCache to use if set.
TYPE:
|
client_secret |
User's Client Secret to access League of Comic Geeks.
TYPE:
|
access_token |
User's Access Token to access League of Comic Geeks.
TYPE:
|
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:
|
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:
|
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:
|
Returns: A list of results.
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |