lizardbyte_db_helper¶
-
Code.lizardbyte_db_helper.get_igdb_id_from_collection(search_query, collection_type=None)[source]¶ Search for a collection by name.
Match a collection by name against the LizardByte db (clone of IGDB), to get the collection ID.
Parameters: - search_query : str
Collection name to search for.
- collection_type : Optional[str]
Collection type to search for. Valid values are ‘game_collections’ and ‘game_franchises’. If not provided, will first search for ‘game_collections’, then ‘game_franchises’, returning the first match.
Returns: - Optional[Tuple[int, str]]
Tuple of
idandcollection_typeif found, otherwise None.
Examples
>>> get_igdb_id_from_collection(search_query='James Bond', collection_type='game_collections') 326 >>> get_igdb_id_from_collection(search_query='James Bond', collection_type='game_franchises') 37