Weeb.sh API Wrapper, customised for use in discord.py
Project description
Pluggable Weeb.sh API Wrapper
Documentation
All available documentation can be found here: weebapi.readthedocs.io
How to install:
1. With pip
pip install -U weebapi
2. From GitHub
pip install -U git+https://github.com/AndyTempel/weebapi#egg=weebapi
Usage:
With bot integration:
from discord.ext.commands import Bot
from weebapi import Client
bot = Bot(command_prefix="+")
Client.pluggable(bot=bot, api_key="VeryNiceKey123")
@bot.command()
async def owo(ctx):
image = await bot.weebsh.get_random(image_type="owo")
await ctx.send(str(image))
>>> https://cdn.weeb.sh/images/SklMOkytDb.jpeg
or without bot integration:
from discord.ext.commands import Bot
from weebapi import Client
bot = Bot(command_prefix="+")
weeb = Client(api_key="VeryNiceKey123")
@bot.command()
async def owo(ctx):
image = await weeb.get_random(image_type="owo")
await ctx.send(str(image))
>>> https://cdn.weeb.sh/images/SklMOkytDb.jpeg
License
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
weebapi-0.1.14b0.tar.gz
(9.8 kB
view hashes)
Built Distributions
weebapi-0.1.14b0-py3.7.egg
(31.1 kB
view hashes)
weebapi-0.1.14b0-py3-none-any.whl
(13.3 kB
view hashes)
Close
Hashes for weebapi-0.1.14b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3c9020033389f58b8d9424809ef7279b927e1011184b64e2480e5a57cd144e7 |
|
MD5 | 16491cdb7ee397cf76b5808ddf70f8f7 |
|
BLAKE2b-256 | c2e47c2eb3528d18c20306746e6628aad97d9d9869b7d76e8878d181a7564d57 |