Skip to content

Commit 20d5acd

Browse files
authored
Update README.md
1 parent 4aec6bd commit 20d5acd

File tree

1 file changed

+65
-2
lines changed

1 file changed

+65
-2
lines changed

README.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,65 @@
1-
# bfd-java-api
2-
A simple API wrapper for discords.com (alias botsfordiscord.com) written in Java.
1+
# Discords.com / BotsForDiscord.com Java Library
2+
[![Release](https://jitpack.io/v/jitpack/android-example.svg)](https://jitpack.io/#jitpack/android-example)
3+
[![Build Status](https://github.com/mdo/github-buttons/workflows/CI/badge.svg)](https://github.com/mdo/github-buttons/actions?workflow=CI)
4+
5+
A simple API wrapper for discords.com (alias botsfordiscord.com) written in Java 8.
6+
7+
## Installation
8+
9+
This wrapper is distributed using [jitpack.io](https://jitpack.io).
10+
11+
Using Maven:
12+
```xml
13+
<repositories>
14+
<repository>
15+
<id>jitpack.io</id>
16+
<url>https://jitpack.io</url>
17+
</repository>
18+
</repositories>
19+
```
20+
```xml
21+
<dependencies>
22+
<dependency>
23+
<groupId>com.github.Dorian349</groupId>
24+
<artifactId>bfd-java-api</artifactId>
25+
<version>VERSION</version>
26+
</dependency>
27+
</dependencies>
28+
```
29+
Using Gradle:
30+
```groovy
31+
repositories {
32+
maven { url 'https://jitpack.io' }
33+
}
34+
```
35+
```groovy
36+
dependencies {
37+
implementation 'com.github.Dorian349:bfd-java-api:VERSION'
38+
}
39+
```
40+
41+
## Features
42+
• Collect information about a user from discords.com
43+
• Collect information about a bot from discords.com such as votes / widget
44+
• Post the bot server count on discords.com
45+
46+
## Simplest Usage
47+
*Note: All classes contains getters to get every information listed on the [documentation](https://docs.botsfordiscord.com). The below examples are just some basic usages. You will need to get your API key and bot id to fully use the wrapper.*
48+
49+
Firstly, you should create a new instance of BotsForDiscordAPI, this will be the main object for all future requests using this wrapper.
50+
51+
```java
52+
BotsForDiscordAPI botsForDiscordAPI = new BotsForDiscordAPI("Your bot ID", "Your API token");
53+
```
54+
55+
Then, you can easily use the 6 different methods to get/post information.
56+
57+
```java
58+
User user = botsForDiscordAPI.getUser("234735468267307008");
59+
System.out.println(user.getUsername()); //Dorian349
60+
61+
Bot bot = botsForDiscordAPI.getBot("466204515390193674");
62+
System.out.println(bot.getName()); //MyBrawlStats
63+
64+
botsForDiscordAPI.postStats(jda.getGuilds().size());
65+
```

0 commit comments

Comments
 (0)