Wrapper for the moonlist api
Project description
Wrapper for the moonlist api
Wrapper for the moonlist api with webhook and auto post data supporting
How to install?
From pip:
pip install moonlistclient
From source:
pip install git+https://github.com/VadyChel/MoonlistClient
Examples
Simple usage:
from moonlistclient import MoonlistClient, HTTPException
from discord.ext import commands, tasks
class MLCExample(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.mclient = MoonlistClient(
bot=self.bot,
api_key="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
autopost=False
)
self.post_stat_loop.start()
@tasks.loop(hours=3)
async def post_stat_loop(self):
await self.bot.wait_until_ready()
try:
await self.mclient.post_stat()
except HTTPException:
print("Failed to post bot stat")
def setup(client):
client.add_cog(MLCExample(client))
Other examples you can see in examples directory
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
moonlistclient-0.6.11.tar.gz
(18.8 kB
view details)
File details
Details for the file moonlistclient-0.6.11.tar.gz
.
File metadata
- Download URL: moonlistclient-0.6.11.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7314ba0889e2eef545bd59896ac87869046d2be9215a44387547b538ec75b52f |
|
MD5 | 2f7790e4e1cdff1ee0e5ed1946d301af |
|
BLAKE2b-256 | 2d07e75adc894a4d112fe90841f6763253b25a70534914ced0d544ebf5f62e2e |