Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (31 loc) · 1.11 KB

DOCUMENTATION.md

File metadata and controls

43 lines (31 loc) · 1.11 KB

YuniteAPI

A asynchronous wrapper for the Yunite API

Getting Started:

Install the package using one of the following commands:
  • pip install YuniteAPI
  • pip install -U YuniteAPI
  • python -m pip install -U git+https://github.com/SylteA/YuniteAPI.git

  • After that, create the client using the following code:

    import YuniteAPI
    import asyncio
    
    
    async def main():
        client = YuniteAPI.Client()
        await client.add_token(guild_id=123456789, api_key='Your api-key') # Add a api-key for that guild_id
        
    
    if __name__ == '__main__':
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())

    For future reference in this documentation: when referring to 'client' we refer to what has been defined above!

    Using the wrapper


    await client.fetch_user(guild_id=123456789, user_id=123456789)

    Fetch a single user id by discord or epic id

    await client.fetch_users(guild_id=123456789, user_ids=[123456789, 987654321])

    Fetch users in bulk by discord or epic id