sok.apis.games.igdb_api
IGDB (Internet Game Database) API implementation.
API Documentation: https://api-docs.igdb.com/ Note: Requires Twitch Client ID and Access Token.
IGDBApi
class IGDBApi(client_id: str, access_token: str)Bases: BaseAPI
IGDB API implementation for video game metadata.
Provides comprehensive game information including platforms, developers, publishers, release dates, and ratings.
Note: Requires Twitch authentication (Client ID + Access Token).
Initialize IGDB API.
Parameters
| Name | Type | Description |
|---|---|---|
client_id | str | Twitch Client ID. |
access_token | str | Twitch Access Token. |
Attributes
| Name |
|---|
client_id |
supported_content_typesproperty
List[ContentType]
Get supported content types.
supported_media_typesproperty
List[MediaType]
Get supported media types.
get_detailsasync
async def get_details( item_id: str, content_type: ContentType, **kwargs,) -> Dict[str, Any]:Get detailed game information from IGDB.
Parameters
| Name | Type | Description |
|---|---|---|
item_id | str | IGDB game ID. |
content_type | ContentType | Content type. |
**kwargs | Additional parameters. |
Returns
Dict[str, Any]Detailed game information.
get_related_itemsasync
async def get_related_items( item_id: str, content_type: ContentType, **kwargs,) -> List[Dict[str, Any]]:Get similar games from IGDB.
Parameters
| Name | Type | Description |
|---|---|---|
item_id | str | IGDB game ID. |
content_type | ContentType | Content type. |
**kwargs | Additional parameters. |
Returns
List[Dict[str, Any]]List of similar games.
searchasync
async def search( query: str, content_type: ContentType, **kwargs,) -> Dict[str, Any]:Search for games on IGDB.
Parameters
| Name | Type | Description |
|---|---|---|
query | str | Game title search query. |
content_type | ContentType | Content type. |
**kwargs | Additional parameters (max_results). |
Returns
Dict[str, Any]Search results with 'results' key.