Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Documentation

Deviant edited this page Dec 23, 2023 · 4 revisions

TOOLS:

How to use is described here: Tools

AKASHA:

How to use is described here: Akasha

ENC:

Main class for generating character cards

Class Arguments:

Argument Description type Example
lang Set generation language. str lang = "en"
uid Game UID str or int uid = "123456789"
character_art dictionary, where the key is
the character ID,and
the values ​​are list or str
a link to the image to replace the splash
dict character_art = {"10000079": "link","10000037": ["link","link"]}
character_id Comma-separated list of character IDs to generate str character_id = "10000079,10000037"
hide_uid Whether to display the UID on the card or not bool hide_uid = True
save Save the generation result to storage media? bool save= True
pickle Dictionary with settings for pickle cache operation dict How to use is described here: Pickle
agent Substitute your User-Agent for requests to the api str agent = "Bot_Name"

create() function:

Function for generating character cards

Function Arguments:

Argument Description type Example
template Select a template int or str template = 1
akasha Add rating from Akasha System bool akasha = True

How to use:

from enkacard import encbanner
import asyncio
async def card():
 async with encbanner.ENC(uid = "811455610") as encard:
 return await encard.creat()
result = asyncio.run(card()) 
print(result)

Function Resultat:

info=Info(uid='811455610', lang='en', save=False) card=[Card(id=10000060, name='Yelan', element='Water', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B048601810>), Card(id=10000062, name='Aloy', element='Ice', rarity=4, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B04175E910>), Card(id=10000073, name='Nahida', element='Grass', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0417139D0>), Card(id=10000052, name='Raiden Shogun', element='Electric', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B041050250>), Card(id=10000089, name='Furina', element='Water', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B041872F50>), Card(id=10000087, name='Neuvillette', element='Water', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0411645D0>), Card(id=10000058, name='Yae Miko', element='Electric', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0486ACF90>), Card(id=10000046, name='Hu Tao', element='Fire', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0410B9F90>)] character_id=['10000060', '10000062', '10000073', '10000052', '10000089', '10000087', '10000058', '10000046'] character_name=['Yelan', 'Aloy', 'Nahida', 'Raiden Shogun', 'Furina', 'Neuvillette', 'Yae Miko', 'Hu Tao'] pickle_size=None

info - ENC Class Settings Information.

  • info.uid - User UID.
  • info.lang - Select lang generated.
  • info.save - Is the image saved.

card - List of generated character card images.

  • card.id- Character id.
  • card.name - Character name.
  • card.element- Character element.
  • card.rarity- Character rarity.
  • card.card - Generated character card.

character_id - List of all character ids for the user.

character_name - List of all character name for the user.

pickle_size - If the size parameter was passed to pickle, it will return data about the sizes of pickle files.

Additional features of the function:

await result.get_charter() - Returns a sorted dictionary {"id": "name", ..}.

await result.get_charter(setting=True) - Returns a sorted dictionary {"id": "name", ..} Only those characters specified in character_id.

await result.get_charter(name=True) - Returns a sorted dictionary {"name": "id", ..}.


profile() function:

Function for generating a user profile card or obtaining user data.

Function Arguments:

Argument Description type Example
teamplate Select template style int teamplate = 2
card Generate a card or not bool card = True
background Replace the background with your image str background = "Link"

How to use:

from enkacard import encbanner
import asyncio
async def card():
 async with encbanner.ENC(uid = "811455610") as encard:
 return await encard.profile(card = True)
result = asyncio.run(card()) 
print(result)

Function Resultat:

player=Player(name='kettle', uid='811455610', lang='en', achievement=624, level=60, world_level=8, abyss='8-3', avatar=HttpUrl('https://api.ambr.top/assets/UI/UI_AvatarIcon_Paimon.png', )) characters=Characters(count=8, character_name=['Yelan', 'Aloy', 'Nahida', 'Raiden Shogun', 'Furina', 'Neuvillette', 'Yae Miko', 'Hu Tao'], character_id=['10000060', '10000062', '10000073', '10000052', '10000089', '10000087', '10000058', '10000046']) card=None

player - User information.

characters - Character information.

  • characters.count - Count Character .
  • characters.character_name - List of character names.
  • characters.character_id- List of character id.

card - Generated profile card.

Additional features of the function:

await result.characters.get_charter() - Returns a sorted dictionary {"id": "name", ..}.

await result.characters.get_charter(name=True) - Returns a sorted dictionary {"name": "id", ..}.

banner

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /