Invite Cookie to your Discord server or to your Discord account
Run /premium api
🚀 Example Usage
The API key can be passed as a parameter or set as the environment variable COOKIE_KEY.
For more information, see to our documentation.
Sync Example
fromcookieimportCookieAPIapi=CookieAPI(api_key="[YOUR_API_KEY]")user_stats=api.get_user_stats(123456789)# Replace with user ID
Async Example
importasynciofromcookieimportAsyncCookieAPIapi=AsyncCookieAPI(api_key="[YOUR_API_KEY]")asyncdefmain():user_stats=awaitapi.get_user_stats(123456789)# Replace with user IDawaitapi.close()asyncio.run(main())
You can also use an asynchronous context manager (recommended)
asyncdefmain():asyncwithapiascon:user_stats=awaitcon.get_user_stats(123456789)# Replace with user ID
⚡ OpenAPI Docs
If you want to use the API without this wrapper, you can find the OpenAPI docs here.
The models in this package are automatically generated using the OpenAPI spec: