Skip to content
This repository was archived by the owner on Jul 26, 2019. It is now read-only.

Commit d7c5d97

Browse files
authored
Fixing spaces and linebreaks
1 parent c74a6c7 commit d7c5d97

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

README.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
[BotBlock]: https://botblock.org
2+
[API]: https://botblock.org/api/docs
3+
4+
[BotBlock4J]: https://github.com/Nathan-webb/BotBlock4J
5+
6+
[Wiki]: https://github.com/Andre601/JavaBotBlockAPI/wiki
7+
18
# JavaBotBlockAPI
2-
JavaBotBlockAPI is a continued and updated Java Wrapper for [BotBlock], a website that makes it possible to update guild counts on multiple lists with one API.
9+
JavaBotBlockAPI is a continued and updated Java Wrapper for [BotBlock], a website that makes it possible to update guild counts on multiple lists with one API.
310
This wrapper is a fork of [BotBlock4J] and was updated and improved to make it as userfriendly as possible.
411

512
## Installation
6-
You can install JavaBotBlockAPI through the following methods.
13+
You can install JavaBotBlockAPI through the following methods.
714
Make sure to replace `{version}` with the above shown version.
815

916
### Gradle
10-
Put this code into your `build.gradle`:
17+
Put this code into your `build.gradle`:
1118
```gradle
1219
repositories{
1320
jcenter()
@@ -19,7 +26,7 @@ dependencies{
1926
```
2027

2128
### Maven
22-
For maven use this code snipped:
29+
For maven use this code snipped:
2330
```xml
2431
<repositories>
2532
<repository>
@@ -41,14 +48,14 @@ For maven use this code snipped:
4148
To use the Wrapper you have to follow these steps.
4249

4350
### Notes
44-
In the below examples do I use a JDA instance called `jda`.
51+
In the below examples do I use a JDA instance called `jda`.
4552
This will also work with ShardManager.
4653

4754
### Creating a BotBlockAPI instance
48-
You first need to create an instance of the BotBlockAPI class.
55+
You first need to create an instance of the BotBlockAPI class.
4956
This class is the center of everything, including on what sites you want to post your guild counts.
5057

51-
You can use the internal Builder class of BotBlockAPI to create an instance. It would look something like this:
58+
You can use the internal Builder class of BotBlockAPI to create an instance. It would look something like this:
5259
```java
5360
// Creating an instance of BotBlockAPI using BotBlockAPI.Builder
5461
BotBlockAPI api = new BotBlockAPI.Builder(jda) // We can provide either a instance of JDA or ShardManager
@@ -58,16 +65,16 @@ BotBlockAPI api = new BotBlockAPI.Builder(jda) // We can provide either a instan
5865
```
5966

6067
#### Notes
61-
`new BotBlockAPI.Builder()` allows you to provide either a JDA instance, a ShardManager instance or none at all.
68+
`new BotBlockAPI.Builder()` allows you to provide either a JDA instance, a ShardManager instance or none at all.
6269
You can define a JDA or ShardManager instance at a later point with `.setJDA(JDA)` or `.setShardManager(ShardManager)` respectively.
6370

64-
Also note that when you don't provide any instance, that you have to use `disableJDA(true)` or else you'll receive an NullPointerException.
65-
There are also a lot of other methods that you can use. Head over to the [wiki] for more information.
71+
Also note that when you don't provide any instance, that you have to use `disableJDA(true)` or else you'll receive an NullPointerException.
72+
There are also a lot of other methods that you can use. Head over to the [Wiki] for more information.
6673

6774
### Creating a RequestHandler instance
6875
The next step after creating an instance of the BotBlockAPI is to create an instance of the Request Handler.
6976

70-
This example shows the easiest one to use, but there are much more ways you can set it. Check the [Wiki] for examples.
77+
This example shows the easiest one to use, but there are much more ways you can set it. Check the [Wiki] for examples.
7178
```java
7279
// We previously created a BotBlockAPI instance called api which we now use here.
7380
RequestHandler handler = new RequestHandler(api);
@@ -79,47 +86,47 @@ This step depends on what You previously set for the BotBlockAPI and the Request
7986
**All methods require BotBlockAPI to be setup, meaning you have AT LEAST added one site and token!**
8087

8188
#### Auto-posting
82-
The Wrapper comes with an inbuilt auto-post that allows you to easily post the guild counts without worrying too much.
89+
The Wrapper comes with an inbuilt auto-post that allows you to easily post the guild counts without worrying too much.
8390
However, this method is limited to JDA and ShardManager only so you have to define them for using this.
8491

85-
To auto-post guild counts you just need to call `RequestHandler#startAutoPosting();`
86-
This would look like this:
92+
To auto-post guild counts you just need to call `RequestHandler#startAutoPosting();`.
93+
This would look like this:
8794
```java
8895
// We previously defined a RequestHandler called handler
8996
handler.startAutoPosting();
9097
```
9198

92-
Easy right? But what if you want to stop the auto-posting?
93-
For that simply use `Request#stopAutoPosting();`. Here is another example:
99+
Easy right? But what if you want to stop the auto-posting?
100+
For that simply use `Request#stopAutoPosting();`. Here is another example:
94101
```java
95102
// We previously defined a RequestHandler called handler
96103
handler.stopAutoPosting();
97104
```
98105

99-
Note thet the delay in which you post to the API is defined through the BotBlockAPI.
106+
Note thet the delay in which you post to the API is defined through the BotBlockAPI.
100107
Use `BotBlockAPI.Builder#setUpdateInterval(Integer)` to define a delay. It is counted in minutes and default is 30.
101108

102109
#### Manual posting
103-
If you want to post the guild counts manually you can use the following method:
110+
If you want to post the guild counts manually you can use the following method:
104111
```java
105112
// We previously defined a RequestHandler called handler
106113
handler.postGuilds();
107114
```
108115

109116
### Exceptions
110-
When you post the guild counts you could encounter certain Exceptions.
117+
When you post the guild counts you could encounter certain Exceptions.
111118
You can receive the following exceptions:
112-
- `IOException`
119+
- `IOException`
113120
The Request couldn't be performed properly. This can be f.e. the case when BotBlock.org denies access (403).
114-
- `RatelimitedException`
115-
When we exceed the ratelimit of BotBlock.org
121+
- `RatelimitedException`
122+
When we exceed the ratelimit of BotBlock.org
116123
This shouldn't be the case with auto-posting since it has a minimum delay of 1 minute.
117-
- `NullPointerException`
124+
- `NullPointerException`
118125
Thrown when BotBlock.org sends an empty response, meaning something got messed up on their side.
119126

120127
## Links
121128
Here are some useful links:
122129
- [BotBlock.org] Site for which this wrapper was made.
123130
- [API] API documentation.
124131
- [Wiki] Contains additional information on how you can use JavaBotBlockAPI.
125-
- [BotBlock4J] Original Wrapper from which this one originates.
132+
- [BotBlock4J] Original Wrapper from which this one originates.

0 commit comments

Comments
 (0)