Grand Comics Database
GrandComicsDatabase
Class with functionality to request GCD API endpoints.
| PARAMETER | DESCRIPTION |
|---|---|
email
|
The user's GCD email address, which is used for authentication.
TYPE:
|
password
|
The user's GCD password, which is used for authentication.
TYPE:
|
base_url
|
Root URL of the GCD API.
TYPE:
|
user_agent
|
Value sent in the
TYPE:
|
timeout
|
Set how long requests will wait for a response (in seconds).
TYPE:
|
cache_path
|
Path to the SQLite cache file. If not provided, a default path will be used under ~/.cache/grayven/cache.sqlite
TYPE:
|
cache_expiry
|
Duration for which cached responses are valid. Response cache-headers take precedence.
TYPE:
|
ratelimit_path
|
Path to the SQLite ratelimit file. If not provided, a default path will be used under ~/.cache/grayven/ratelimits.sqlite
TYPE:
|
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
Methods:
get_issue
Request an Issue using its id.
| PARAMETER | DESCRIPTION |
|---|---|
issue_id
|
The Issue id.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Issue
|
A Issue object. |
| RAISES | DESCRIPTION |
|---|---|
ServiceError
|
If the API response is invalid or validation fails. |
AuthenticationError
|
If credentials are invalid. |
RateLimitError
|
If the API rate limit is exceeded. |
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
get_publisher
Request a Publisher using its id.
| PARAMETER | DESCRIPTION |
|---|---|
publisher_id
|
The Publisher id.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Publisher
|
A Publisher object. |
| RAISES | DESCRIPTION |
|---|---|
ServiceError
|
If the API response is invalid or validation fails. |
AuthenticationError
|
If credentials are invalid. |
RateLimitError
|
If the API rate limit is exceeded. |
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |
get_series
Request a Series using its id.
| PARAMETER | DESCRIPTION |
|---|---|
series_id
|
The Series id.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Series
|
A Series object. |
| RAISES | DESCRIPTION |
|---|---|
ServiceError
|
If the API response is invalid or validation fails. |
AuthenticationError
|
If credentials are invalid. |
RateLimitError
|
If the API rate limit is exceeded. |
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
list_issues
Request a list of Issues.
| PARAMETER | DESCRIPTION |
|---|---|
series_name
|
The name of the series to filter issues from.
TYPE:
|
issue_number
|
The number to filter issues by.
TYPE:
|
year
|
Filter the results using the issue year via its key_date.
TYPE:
|
max_results
|
If given, return at most this many results.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[BasicIssue]
|
A list of Issue objects. |
| RAISES | DESCRIPTION |
|---|---|
ServiceError
|
If the API response is invalid or validation fails. |
AuthenticationError
|
If credentials are invalid. |
RateLimitError
|
If the API rate limit is exceeded. |
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | |
list_onsale_weekly_issues
Request a list of issues on sale in a given ISO week.
| PARAMETER | DESCRIPTION |
|---|---|
year
|
The ISO year (4-digit year).
TYPE:
|
week
|
The ISO week number (1-53).
TYPE:
|
max_results
|
If given, return at most this many results.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[BasicIssue]
|
List of BasicIssue objects representing issues that went on sale during the given week. |
| RAISES | DESCRIPTION |
|---|---|
ServiceError
|
If the API response is invalid or validation fails. |
AuthenticationError
|
If credentials are invalid. |
RateLimitError
|
If the API rate limit is exceeded. |
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
list_publishers
Request a list of Publishers.
| PARAMETER | DESCRIPTION |
|---|---|
max_results
|
If given, return at most this many results.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Publisher]
|
A list of Publisher objects. |
| RAISES | DESCRIPTION |
|---|---|
ServiceError
|
If the API response is invalid or validation fails. |
AuthenticationError
|
If credentials are invalid. |
RateLimitError
|
If the API rate limit is exceeded. |
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
list_series
Request a list of Series.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Filter the results using the series name.
TYPE:
|
year
|
Filter the results using the series beginning year (Requires name to be passed).
TYPE:
|
max_results
|
If given, return at most this many results.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Series]
|
A list of Series objects. |
| RAISES | DESCRIPTION |
|---|---|
ServiceError
|
If the API response is invalid or validation fails. |
AuthenticationError
|
If credentials are invalid. |
RateLimitError
|
If the API rate limit is exceeded. |
Source code in grayven/grand_comics_database.py
| Python | |
|---|---|
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |