Skip to main content

Weeb.sh API Wrapper, customised for use in discord.py

Project description

# weebapi

![img](https://img.shields.io/pypi/v/weebapi.svg) ![img2](https://img.shields.io/pypi/pyversions/weebapi.svg)

## Pluggable Weeb.sh API Wrapper

### Documentation

**All available documentation can be found here:** [weebapi.readthedocs.io](https://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:**

```python
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:**

```python
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
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for weebapi, version 0.1.13b0
Filename, size File type Python version Upload date Hashes
Filename, size weebapi-0.1.13b0-py3.6.egg (30.7 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size weebapi-0.1.13b0-py3-none-any.whl (14.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size weebapi-0.1.13b0.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page