API Reference¶
Main Client¶
-
class
pyKirara.Kirara(requests_session=True, request_timeout=10)[source]¶ A class that connects to the kirara api
-
get_card(card_id: int, en_translate=False)[source]¶ Retrieve a card’s data
Parameters: - card_id (int) – A Card’s ID to use from
- en_translate (bool) – Whether to translate the title, skill name, and lead skill to english
Returns: A Card object, which contains the card’s info
Return type:
-
get_id(category, name, card_rarity=None, position=None)[source]¶ Find a specific id based on parameters given
Parameters: - category (str) – Which category to search from (‘card_t, or ‘char_t’)
- name (str) – An idol’s name, full or just one part of a name
- card_rarity (str) – A rarity of card to look from (ranges from n to ssr, or n+ to ssr+)
- position (int) – Which card to get, based on release order
Returns: - list – A list of cards matching the parameters
- int – An ID of a specfic idol, or card
-
get_idol(idol_id: int)[source]¶ Retrieve an idol’s info
Parameters: idol_id (int) – An Idol’s ID to use from Returns: An Idol object, which contains the idol’s info Return type: Idol
-
get_image(card: pyKirara.card.Card, category='card')[source]¶ Retrieve a Card’s image data
Parameters: - card (Card) – A card object to use
- catergory (str) – What type of image to use (Default value is ‘card’)
Returns: The image bytes
Return type: bytes
-
Return Dataclasses¶
-
class
pyKirara.idol.Idol(char_data: dict)[source]¶ Represents an idol and her data
-
char_id¶ The idol’s character id
Type: int
-
age¶ The idol’s age
Type: int
-
bday¶ The idol’s birthday (not including month)
Type: int
-
bmonth¶ The idol’s birthmonth
Type: int
-
btype¶ The idol’s bloodtype
Type: str
-
bust¶ The idol’s bust measurement
Type: int
-
waist¶ The idol’s waist mearsurement
Type: int
-
hip¶ The idol’s hip measurement
Type: int
-
horoscope¶ The idol’s constellation horoscope
Type: str
-
conventional¶ The idol’s conventional name
Type: str
-
favorite¶ The idol’s favorite hobby
Type: str
-
hand¶ The idol’s dominant hand
Type: str
-
height¶ The idol’s height (in centimeters)
Type: int
-
home_town¶ The idol’s hometown
Type: str
-
kana_spaced¶ The idol’s name but in spaced kana
Type: str
-
kanji_spaced¶ The idol’s name but in kanji
Type: str
-
name¶ The idol’s name in japanese
Type: str
-
name_kana¶ The idol’s name in kana
Type: str
-
personality¶ The idol’s personality value
Type: int
-
type¶ The idol’s type (Cute, Cool, Passion, etc.)
Type: str
-
voice¶ The idol’s VA
Type: str
-
weight¶ The idol’s weight
Type: int
-
icon¶ The link to the idol’s icon
Type: str
-
-
class
pyKirara.card.Card(card_data: dict)[source]¶ Represents a Card and its data
-
card_id¶ The card’s card id
Type: int
-
album_id¶ The card’s album id
Type: int
-
type¶ The card’s type (Cool, Cute, Passion, Office)
Type: str
-
image¶ The card’s image API link
Type: str
-
has_spread¶ True if the card has a spread image, otherwise false
Type: bool
-
icon¶ The card’s icon link
Type: str
-
chara_id¶ The card’s character id
Type: int
-
evo_id¶ The card’s evolution id of transformed card
Type: int
-
evo_type¶ The card’s evolution rarity type (From R to SSR)
Type: int
-
grow_type¶ An integer that represents a boolean value, checks if card can grow or not
Type: int
-
name¶ The card’s name
Type: str
-
title¶ The card’s untranslated title
Type: str
-
open_dress_id¶ The card’s model id
Type: int
-
place¶ The card’s place value
Type: int
-
pose¶ The card’s sprite number
Type: int
-
series_id¶ The evolution chain id of the card
Type: int
-
min_vocal¶ The card’s minimum vocal value
Type: int
-
max_vocal¶ The card’s maximum vocal value
Type: int
-
bonus_vocal¶ The card’s bonus vocal value
Type: int
-
min_dance¶ The card’s minimum dance value
Type: int
-
max_dance¶ The card’s maximum dance value
Type: int
-
bonus_dance¶ The card’s bonus dance value
Type: int
-
min_visual¶ The card’s minimum visual value
Type: int
-
max_visual¶ The card’s maximum visual value
Type: int
-
bonus_visual¶ The card’s bonus visual value
Type: int
-
min_hp¶ The card’s minimum health value
Type: int
-
max_hp¶ The card’s maximum health value
Type: int
-
bonus_hp¶ The card’s bonus health value
Type: int
-
-
class
pyKirara.card.Rarity(rarity_data: dict)[source]¶ Represent a Card’s rarity data
-
rarity¶ An int representing how rare the card is
Type: int
-
base_max_level¶ A number that is the level cap of the card
Type: int
-
add_max_level¶ A number that is how many levels the card can possibly have
Type: int
-
max_love¶ The max amount of love that can be obtained
Type: int
-
base_give_money¶ The amount of money the card gives if the card is retired
Type: int
-
base_give_exp¶ The amount of exp the card give if they are used as exp fodder
Type: int
-
add_param¶ ???
Type: int
-
max_star_rank¶ The cap that the card can get by increasing star rank
Type: int
-
-
class
pyKirara.skills.Skill(skill_data: dict)[source]¶ Represents a Skill and its Data
-
id¶ The Skill’s ID
Type: int
-
name¶ The Skill’s name
Type: str
-
explain¶ An untranslated explanation of the skill
Type: str
-
en_explain¶ A machine translated explanation of the skill
Type: str
-
skill_type¶ The Skill’s type
Type: str
-
judge_type¶ Type: int
-
trigger_type¶ Type: int
-
trigger_value¶ Type: int
-
cutin_type¶ Type: int
-
condition¶ Type: int
-
value¶ Type: int
-
value_2¶ Type: int
-
max_chance¶ percent stuff
Type: int
-
max_duration¶ The max duration of how long the skill last in milliseconds
Type: int
-
skill_type_id¶ The skill type’s id
Type: int
-
effect_length¶ A dict of the minimum and max value of the how long the skill’s effect last
Type: dict
-
proc_chance¶ A dict of the minimum and max value of the probability the skill will take effect
Type: dict
-
-
class
pyKirara.skills.LeadSkill(skill_data: dict)[source]¶ Represents a Lead Skill and it’s data
-
id¶ The Skill’s ID
Type: int
-
name¶ The Skill’s name
Type: str
-
explain¶ An untranslated explanation of the skill
Type: str
-
en_explain¶ A machine translated explanation of the skill
Type: str
-
need_cute¶ A bool value if the skill requires a Cute Idol
Type: bool
-
need_cool¶ A bool value if the skill requires a Cool Idol
Type: bool
-
need_passion¶ A bool value if the skill requires a Passion Idol
Type: bool
-
target_attribute¶ What attribute the skill affects
Type: str
-
target_attribute_2¶ Another attribute the skill affects
Type: str
-
target_param¶ What parameter the skill affects (Visual, Vocal, etc.)
Type: str
-
target_param Another parameter the skill affects
Type: str
-
up_type¶ ???
Type: int
-
up_type_2¶ ???
Type: int
-
up_value¶ ???
Type: int
-
up_value_2¶ ???
Type: int
-
special_id¶ The skill’s special ID
Type: int
-
need_chara¶ If the skill needs a specific character
Type: str
-
-
class
pyKirara.infos.Gacha(gacha_data: dict)[source]¶ Represents gacha information
-
gacha¶ A value that represents the gacha’s position
Type: int
-
id¶ The gacha’s id
Type: int
-
name¶ The gacha’s name in japanese
Type: str
-
start_date¶ The gacha’s start date
Type: UNIX-datetime
-
end_date¶ The gacha’s end date
Type: UNIX-datetime
-
type¶ The gacha type
Type: int
-
subtype¶ The gacha sub-type
Type: int
-
rates¶ The weighted rates for the gacha
Type: dict
-
-
class
pyKirara.infos.Info(info_data: dict)[source]¶ Represents the API’s info
-
truth¶ The game’s (Deresute) truth version
Type: str
-
api_major¶ The API’s version major
Type: int
-
api_revision¶ The API’s revision number
Type: int
-
-
class
pyKirara.infos.Event(gacha_data)[source]¶ Represents event info
-
event¶ Event index number in ‘happening/now’ endpoint
Type: int
-
id¶ The event’s id
Type: int
-
name¶ Event name
Type: str
-
start_date¶ Event start date
Type: datetime obj
-
end_date¶ Event end date
Type: datetime obj
-
result_end_date¶ The time left for the Event until it ends
Type: datetime obj
-