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)

pip install voidapi

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

voidapi-1.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: voidapi-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6d46733086db80b5f80e0bef0528b922c77393c6a9e2ab8d749e3f50647d82a
MD5 4789aaa1f8be9b49e66f6e1aca64d23c
BLAKE2b-256 806dcb659c12e6e1c3942dfd1bb217181eea985ffc46a44a17071751354f1b7a

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