-
-
Notifications
You must be signed in to change notification settings - Fork 11
Documentation
Deviant edited this page May 17, 2024
·
22 revisions
- Documentation
- View cards
- API
- Languages-Supported
- F.A.Q.
- PyPi
- Telegram
- Patreon
- GitHub
Card()
- The main class for generating character and profile cards. | Example
-
lang
- The language in which the data will be acquired. | Type:str
| Languages Supported -
character_art
- Transfer artwork to be displayed on cards. | Type:dict
| Example -
character_id
- List of character ids to be obtained | Type:str
| Example -
seeleland
- Add information from the Seeleland website | Type:bool
-
user_font
- Set Custom Font | Type:str
| Example -
save
- Save Generated Cards | Type:bool
| Doesn't work for animated ones -
asset_save
- Save Assets to Device | Type:bool
-
boost_speed
- Loads character assets. | Type:bool
| Fills up the device memory -
remove_logo
- Remove GitHub logo from cards | Type:bool
-
enka
- Use EnkaNetwork API | Type:bool
| MiHoMo API is used by default. -
cashe
- Set Cache Settings | Type:dict
| Example -
api_data
- Pass your data received via: api.ApiMiHoMo | Type:MiHoMoApi
| Example -
user_agent
- Custom User-Agent | Type:str
-
proxy
- Proxy as a string | Type:str
-
color
- Set a custom color for a character | Type:dict
| Example
Warning
Parameter: boost_speed
can fill your device's memory.
-
create_profile()
- Function for generating a user profile card. | Example
-
uid
- UID of the user in the game | Type:int
-
style
- Card style. | Type:int
| Defaults:1
-
hide_uid
- Hide UID. | Type:bool
| Defaults:False
-
background
- Link to custom card background. | Type:str
| Example -
force_update
- Forced update of user data. | Type:bool
| Defaults:False
-
create()
- Function for generating character cards. | Example
-
uid
- UID of the user in the game | Type:int
-
style
- Card style. | Type:int
| Defaults:1
-
hide_uid
- Hide UID. | Type:bool
| Defaults:False
-
force_update
- Forced update of user data. | Type:bool
| Defaults:False
Note
Subsequent functions must be called before the main functions: create()
and create_profile()
-
set_lang()
- Function for generating character cards. | Example
-
lang
- The language in which the data will be acquired. | Type:str
| Languages Supported
-
set_user_font()
- Will install a custom font. | Example
-
user_font
- Font path or font name. | Type:str
Note
Additional functions will be provided here to help with development.
-
get_link_image()
- Allows you to save the user's image to the server and access it via a link | Example
-
img
- Link to image or image in format:base64
| Type:str
-
api_key
- The API key was obtained here: https://api.imgbb.com/ | Defaults:None
.
-
is_valid_image()
- Check the image from the link or not | Example
-
url
- Link to image | Type:str
-
session
- aiohttp or other session. | Type:session
| Defaults:None
. -
allow_redirects
- Allow redirection. | Type:bool
| Defaults:True
.
Important
This function also accepts other parameters related to requests.