Skip to content

AndyTempel/weebapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weebapi

img img2 FOSSA Status

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

FOSSA Status