-
-
Notifications
You must be signed in to change notification settings - Fork 11
F.A.Q.
Deviant edited this page May 17, 2024
·
9 revisions
You can use
save_gif()
function you can save in 2 ways and 2 formats. | Example
-
Pillow
method supports formats:webp
andgif
-
Moviepy
: method only supportsgif
-
type
-pillow
ormoviepy
| Type:str
| Default:pillow
-
format
-gif
orwebp
| Type:str
| Default:gif
-
name_file
- Name of the saved file. | Type:str
| Default:None
-
resize
- Reduce card size. | Type:tuple
| Default:None
You can use the
show()
method on the Pillow image itself, or you can use theshow()
method on the card model | Example
Use the
get_info()
model function | Example
-
lang
- The language in which the data will be acquired. | Type:str
| Languages Supported
Q: How to get the id and name of the characters or the Name of the character and his id in the form of a dictionary?
After generation use the function:
get_charter()
| Example
-
setting
- Will return only the data you specified in theCard()
class | Type:bool
| Default:None
-
name
- Will return a dictionary where the key is names | Type:bool
| Default:None
To do this, use the
get_name()
orget_character_id()
functions.
-
name
- Used for function:get_character_id()
Allows you to get a character ID by his name | Default:None
-
characrer_id
- Used for function:get_name()
Allows you to get a character name by his id | Default:None
-
lang
- Language in which the data is received | Languages-Supported
Use the following code:
import asyncio
from starrailcard.src.api import enka
async def main():
await enka.ApiEnkaNetwork().update_assets() #update_assets - Accepts a lang argument to load only a specific language, leave empty if you want to load all languages
asyncio.run(main())