Comicvine
Comicvine(api_key: str, timeout: int = 30, cache: Optional[SQLiteCache] = None)
Comicvine to request Comicvine API endpoints.
PARAMETER | DESCRIPTION |
---|---|
api_key |
User's API key to access the Comicvine API.
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 Comicvine API.
TYPE:
|
api_key |
User's API key to access the Comicvine API.
TYPE:
|
timeout |
How long requests will wait for a response (in seconds).
TYPE:
|
cache |
SQLiteCache to use if set.
TYPE:
|
Functions
character(character_id: int) -> Character
Request data for a Character based on its id.
PARAMETER | DESCRIPTION |
---|---|
character_id |
The Character id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Character
|
A Character object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
character_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[CharacterEntry]
Request data for a list of CharacterEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[CharacterEntry]
|
A list of CharacterEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
concept(concept_id: int) -> Concept
Request data for a Concept based on its id.
PARAMETER | DESCRIPTION |
---|---|
concept_id |
The Concept id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Concept
|
A Concept object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
concept_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[ConceptEntry]
Request data for a list of ConceptEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[ConceptEntry]
|
A list of ConceptEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
creator(creator_id: int) -> Creator
Request data for a Creator based on its id.
PARAMETER | DESCRIPTION |
---|---|
creator_id |
The Creator id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Creator
|
A Creator object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
creator_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[CreatorEntry]
Request data for a list of CreatorEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[CreatorEntry]
|
A list of CreatorEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
issue(issue_id: int) -> Issue
Request data for an Issue based on its id.
PARAMETER | DESCRIPTION |
---|---|
issue_id |
The Issue id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Issue
|
A Issue object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
issue_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[IssueEntry]
Request data for a list of IssueEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[IssueEntry]
|
A list of IssueEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
location(location_id: int) -> Location
Request data for a Location based on its id.
PARAMETER | DESCRIPTION |
---|---|
location_id |
The Location id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Location
|
A Location object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
location_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[LocationEntry]
Request data for a list of LocationEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[LocationEntry]
|
A list of LocationEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
publisher(publisher_id: int) -> Publisher
Request data for a Publisher based on its id.
PARAMETER | DESCRIPTION |
---|---|
publisher_id |
The Publisher id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Publisher
|
A Publisher object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
publisher_list(params: Optional[Dict[str, Any]] = None, max_results: int = 500) -> List[PublisherEntry]
Request data for a list of PublisherEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[PublisherEntry]
|
A list of PublisherEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
search(resource: ComicvineResource, query: str, max_results: int = 500) -> Union[List[PublisherEntry], List[VolumeEntry], List[IssueEntry], List[StoryArcEntry], List[CreatorEntry], List[CharacterEntry], List[TeamEntry], List[LocationEntry], List[ConceptEntry]]
Request a list of search results filtered by provided resource.
PARAMETER | DESCRIPTION |
---|---|
resource |
Filter which type of resource to return.
TYPE:
|
query |
Search query string.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Union[List[PublisherEntry], List[VolumeEntry], List[IssueEntry], List[StoryArcEntry], List[CreatorEntry], List[CharacterEntry], List[TeamEntry], List[LocationEntry], List[ConceptEntry]]
|
A list of results, mapped to the given resource. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
story_arc(story_arc_id: int) -> StoryArc
Request data for a StoryArc based on its id.
PARAMETER | DESCRIPTION |
---|---|
story_arc_id |
The StoryArc id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
StoryArc
|
A StoryArc object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
story_arc_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[StoryArcEntry]
Request data for a list of StoryArcEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[StoryArcEntry]
|
A list of StoryArcEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
team(team_id: int) -> Team
Request data for a Team based on its id.
PARAMETER | DESCRIPTION |
---|---|
team_id |
The Team id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Team
|
A Team object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
team_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[TeamEntry]
Request data for a list of TeamEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[TeamEntry]
|
A list of TeamEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
volume(volume_id: int) -> Volume
Request data for a Volume based on its id.
PARAMETER | DESCRIPTION |
---|---|
volume_id |
The Volume id.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Volume
|
A Volume object |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
volume_list(params: Optional[Dict[str, Union[str, int]]] = None, max_results: int = 500) -> List[VolumeEntry]
Request data for a list of VolumeEntries.
PARAMETER | DESCRIPTION |
---|---|
params |
Parameters to add to the request.
TYPE:
|
max_results |
Limits the amount of results looked up and returned.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[VolumeEntry]
|
A list of VolumeEntry objects. |
RAISES | DESCRIPTION |
---|---|
ServiceError
|
If there is an issue with validating the response. |
ComicvineResource
Bases: Enum
Enum class for Comicvine Resources.
Attributes
CHARACTER = (4005, 'character', List[CharacterEntry])
class-attribute
instance-attribute
Details for the Character resource on Comicvine.
CONCEPT = (4015, 'concept', List[ConceptEntry])
class-attribute
instance-attribute
Details for the Concept resource on Comicvine.
CREATOR = (4040, 'person', List[CreatorEntry])
class-attribute
instance-attribute
Details for the Creator resource on Comicvine.
ISSUE = (4000, 'issue', List[IssueEntry])
class-attribute
instance-attribute
Details for the Issue resource on Comicvine.
LOCATION = (4020, 'location', List[LocationEntry])
class-attribute
instance-attribute
Details for the Location resource on Comicvine.
PUBLISHER = (4010, 'publisher', List[PublisherEntry])
class-attribute
instance-attribute
Details for the Publisher resource on Comicvine.
STORY_ARC = (4045, 'story_arc', List[StoryArcEntry])
class-attribute
instance-attribute
Details for the Story Arc resource on Comicvine.
TEAM = (4060, 'team', List[TeamEntry])
class-attribute
instance-attribute
Details for the Team resource on Comicvine.
VOLUME = (4050, 'volume', List[VolumeEntry])
class-attribute
instance-attribute
Details for the Volume resource on Comicvine.
resource_id: int
property
Start of id used by comicvine to create unique ids.
search_resource: str
property
Resource string for filtering searches.
search_response: Type[T]
property
Response type for resource when using a search endpoint.