Skip to main content

qeaml's wrapper for GameBanana's API

Project description

gbapi

qeaml's wrapper for GameBanana's API

About

gbapi is a straight-to-the-point, asynchronous Python API wrapper for GameBanana's API. Please do note that this is my first proper API, so go easy on me :) If you want to get in contact with me through GB, click here to go to my profile, and feel free to PM me about anything.

Requirements

  • Python 3.6+
  • aiohttp

Getting started

First, install the library with pip:

pip install gbapi

Then, simply import it and use the Client to communicate with GameBanana!

import gbapi
gb = gbapi.Client()
await gb.get_map(123)
await gb.get_skin(456)
await gb.(...)

Here's a basic example:

import asyncio
import gbapi

async def main():
	gb = gbapi.Client()
	m = await gb.get_map(12345)
	print(m.game.name)      #prints the name of the game the map is for
	print(m.author.name)    #prints the name of the submitter
	await gb.close()        #remember to always close() your client !

if __name__ == '__main__':
	loop = asyncio.get_event_loop()
	loop.run_until_complete(main())

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

gbapi-0.2.0.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

gbapi-0.2.0-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

Supported by

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