Skip to main content

A simple API wrapper for voidbots.net.

Project description

Void API | Docs

An Python wrapper for the https://voidbots.net/

Requirements

  • Pythin 3.6 or above
  • aiohttp (python -m pip install aiohttp)
  • discord.py (python -m pip install discord.py)
  • python-dateutil (python -m pip install python-dateutil)

Installation

Install via pip (recommended)

soon

Install from source

pip install git+https://github.com/ggashish/voidapi/

Documentation

Documentation can be found here

Features

  • POST bot stats
  • GET check voted
  • GET bot info
  • GET bot analytics
  • GET bot reviews
  • GET search bot
  • GET bot votes
  • GET user info
  • GET pack info

Support

You can get support be either joining our Support Server or contact me on ggashish#6132

Usage

import voidapi

client = voidapi.Client(bot, api_key)

Funtions

await client.check_voted(bot_id, user_id)

Check if a user has voted for a bot.

Parameters:

  • bot_id (int) - ID of bot to check for.
  • user_id (int) - ID of user to check for.

Returns CheckVoted (class):

Attributes:

  • bot_id (int) - ID of the bot
  • voter_id (int) - ID of the voter
  • voted (bool) - Voted for the bot or not.
  • vote_time (datetime.datetime) - Time of vote if voted.
  • next_vote (datetime.datetime) - Time of the next vote if voted.

await client.bot_info(bot_id)

Get a specific bot's information.

Parameters:

  • bot_id (int) - ID of bot to check for.

Returns BotInfo (class):

Attributes:

  • bot_id(int) - ID of the bot.
  • servers(int) - Server count if available.
  • owners(List(int)) - IDs of the bot's owner.
  • votes(int) - Number of votes bot received.
  • monthly_votes(int) - Total monthly vote received.
  • total_votes(int) - Total bot's votes.
  • blurb(str) - Short description of the bot.
  • description(str) - Long bot's description.
  • certified(bool) - Bot is certified.
  • links(dict) - Dict of all the links.
  • tags(List(str)) - List of all the bot tags.

await client.bot_analytics(bot_id)

Get the analytics that we store for your bot.

Parameters:

  • bot_id (int) - ID of bot to check for.

Returns CheckVoted (class):

Attributes:

  • bot_id(int) - ID of the bot.
  • analytics(List(dict)) - List of dicts of analytics.

await client.bot_reviews(bot_id)

Get the reviews are stored for your bot.

Parameters:

  • bot_id (int) - ID of bot to check for.

Returns BotReviews (class):

Attributes:

  • analytics(List(dict)) - List of dicts of reviews if available.

await client.search_bot(query)

Search our list of bots using a json api.

Parameters:

  • bot_id (str) - Query to search bot.

Returs Dict:

  • Returns a dict of bots is available.

await client.bot_votes(bot_id)

Get an array of users who have voted for your bot.

Parameters:

  • bot_id (int) - ID of bot to check for.

Returs List:

  • Returns a list of users who voted the bot if available.

await client.user_info(user_id)

Get a specific user's information.

Parameters:

  • user_id (int) - The ID of the user to check for.

Returns UserInfo (class):

Attributes:

  • user_id(int) - ID of the user.
  • blurb(str) - Short description of the user.
  • description(str) - Long description of the user.
  • theme(str) - Theme of the user.
  • bots(List(int)) - List of bots user owns if any.
  • packs(List(str)) - List of pack user own if any.
  • achievements(List(str)) - List of achievement of users if any.
  • blacklist(List(str)) -
  • first_login(datetime.datetime) - First time user logged in.
  • last_login(datetime.datetime) - Last time user logged in.
  • links(List(str)) - List of links of users if any.

await client.pack_info(pack_id)

Get a specific user's information.

Parameters:

  • pack_id (str) - The ID of the pack to check for.

Returns PackInfo (class):

Attributes:

  • pack_id(str) - ID of the pack.
  • name(str) - Name of the pack.
  • description(str) - Description of the pack.
  • bots(List(int)) - List of bots the pack have.
  • owners(List(int)) - List of owner the pack.
  • tags(List(str)) - List of tags the pack have.
  • created_at(datetime.datetime) - Time of pack creating

Project details


Download files

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

Source Distribution

voidapi-1.0.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voidapi-1.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file voidapi-1.0.1.tar.gz.

File metadata

  • Download URL: voidapi-1.0.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for voidapi-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c62685c650633b2fa2406a61ff5861e3a83393f35c30b5c8de13c6053d9c127f
MD5 7af41f35e136f2f447a59e900562d7b4
BLAKE2b-256 86b059be8773caed0f87276c8daf4389cdfa74165043055f492ec072e5cd99b5

See more details on using hashes here.

File details

Details for the file voidapi-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: voidapi-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for voidapi-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d848d59195cd08009f72620ee845ae587ff96448b7ac6aac0546984cda09cc44
MD5 5b39d07069bf41a72a2e4321c6cf835e
BLAKE2b-256 de45ffde44318417c445985966b63f65dd440916173d6c5ae1742ffe20ba4e4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page