Skip to main content

topbotgg 1.0.0-beta.1 copy "topbotgg: ^1.0.0-beta.1" to clipboard
topbotgg: ^1.0.0-beta.1 copied to clipboard

A Dart package that allows you to easily interact with the topbot.gg API.

example/example.dart

import 'package:topbotgg/topbotgg.dart';

void main() async {
	final String topbotToken = 'TOPBOTTOKEN';
	final String botId = 'BOTID';

	final client = TopBotClient(apiToken: topbotToken);

	try {
		await client.postBotStats('${botId}', serverCount: 1);
		print('Bot Stats posted to topbot.gg');

		final bot = await client.getBot('${botId}');
		print('Bot Fetched: ${bot.name} (Servers: ${bot.serverCount})');
	} on TopBotClientException catch (e) {
		print('${e.statusCode} - ${e.message}');
	} finally {
		client.dispose();
	}
}
0
likes
150
points
45
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart package that allows you to easily interact with the topbot.gg API.

Repository

License

MIT (license)

Dependencies

http

More

Packages that depend on topbotgg