Skip to content

Commit 3325a51

Browse files
committed
Add wiki files and wiki-action
1 parent a765096 commit 3325a51

File tree

12 files changed

+1571
-0
lines changed

12 files changed

+1571
-0
lines changed

.github/workflows/wiki_update.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Update Wiki
2+
3+
on:
4+
push:
5+
paths:
6+
- 'wiki/**'
7+
8+
jobs:
9+
update:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: action/checkout@v1
13+
- name: Update wiki
14+
uses: docker://decathlon/wiki-page-creator-action:latest
15+
env:
16+
ACTION_MAIL: ${{ secrets.EMAIL }}
17+
ACTION_NAME: Andre601
18+
GH_PAT: ${{ secrets.GH_PAT }}
19+
MD_FOLDER: wiki
20+
OWNER: botblock
21+
REPO_NAME: JavaBotBlockAPI
22+
SKIP_MD: README.md

wiki/BotBlockAPI.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[Site]: https://docs.botblock.org/JavaBotBlockAPI/com/andre601/javabotblockapi/Site.html
2+
[API]: https://botblock.org/api/docs#count
3+
4+
The BotBlockAPI is the essential class for loading botlist sites and their API tokens to then post the Guild counts.
5+
Posting the guild counts is handled through the [[PostAction]] class.
6+
7+
## Getting started
8+
To start, you need to add the sites and their corresponding API-tokens to the BotBlockAPI class.
9+
You may receive an API-token from the bot lists your bot is listed on.
10+
11+
We recommend using the [Builder](#builder) class for an easy way of adding the tokens and changing other settings.
12+
If you still want to load the sites manually then you have to provide a `HashMap<String, String>` with the site name and their token.
13+
14+
#### Example
15+
```java
16+
private Map<String, String> botSites = new HashMap<>();
17+
18+
botSites.put("lbots.org", "MyT0k3N.1")
19+
botSites.put("botlist.space", "MyT0k3N.2")
20+
21+
BotBlockAPI api = new BotBlockAPI(botSites);
22+
```
23+
24+
You can also use `BotBlockAPI(Map, Integer)` to set an update delay for the auto-post option of the [[PostAction]].
25+
26+
## Builder
27+
The Builder is a internal class inside the BotBlockAPI to create an instance of BotBlockAPI easy and fast.
28+
The class offers the following methods to use:
29+
30+
### `addAuthToken(Site, String)`
31+
> **Required**: Yes (You have to use it at least once)
32+
33+
Adds the provided [Site] and token to the HashMap.
34+
35+
### `addAuthToken(String, String)`
36+
> **Required**: Yes (You have to use it at least once)
37+
38+
Adds the provided Site and token to the HashMap.
39+
A list of all supported sites can be found on the [API doc of BotBlock][API]
40+
41+
### `setAuthTokens(HashMap<String, String>)`
42+
> **Required**: Yes (When you didn't use [`addAuthToken(..., String)`](#addauthtokensite-string) at least once.)
43+
44+
Similar to `addAuthToken` but instead directly sets the HashMap.
45+
**This will overwrite every previously set entry.**
46+
47+
### `setUpdateInterval(Integer)`
48+
> **Required**: No. (Default is 30)
49+
50+
Sets the delay (in minutes) in which the auto-post option should post the guild counts to the BotBlock API.
51+
The minimum delay is 2 minutes. Anything below this number will throw an `IllegalArgumentException`.
52+
53+
### `build()`
54+
> **Required**: Yes
55+
56+
Builds the Instance of the BotBlockAPI with the previously set information.

wiki/Changelog.md

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
## Changelog
2+
This page lists all versions of JavaBotBlockAPI and the changes being made.
3+
4+
> ### Important
5+
> - Numbers marked with a `*` are not available on bintray.
6+
> You may use [jitpack.io](https://jitpack.io) for downloading those.
7+
> - Numbers marked with a `**` will require you to add `https://dl.bintray.com/andre601/maven` to your build.gradle or pom.xml as a repository.
8+
> - Numbers below version `4.0.0` use `com.andre601` as package and not `org.botblock`
9+
10+
## v5
11+
12+
### 5.1.2
13+
- BotBlockAPI will now throw an IllegalArgumentException when the provided Map is empty.
14+
- The Integer updateDelay in BotBlockAPI is now marked as `@NotNull`
15+
16+
### 5.1.1
17+
- Site updated:
18+
- Added [`GLENNBOTLIST_XYZ`](https://glennbotlist.xyz)
19+
20+
### 5.1.0
21+
- Removed deprecated `GetAction` class. Use `GetBotAction` or `GetListAction` respectively.
22+
23+
### 5.0.5*
24+
- Second test for adding zip file to Release.
25+
26+
### 5.0.4*
27+
- Test for adding zip file to Release.
28+
29+
### 5.0.3*
30+
- Debugging.
31+
32+
### 5.0.2
33+
- Changed `@DeprecatedSince` annotation.
34+
- Dependencies updated:
35+
- JDA: `4.1.0_96` to `4.1.0_97`
36+
37+
### 5.0.1
38+
- Renamed `getFilteredList(String)` to `getFilteredLists(String)`
39+
40+
### 5.0.0
41+
- Deprecated `GetAction`. `GetBotAction` and `GetListAction` were added as replacement.
42+
- New methods added to `GetListAction`:
43+
- `getApiField(String, Site|String, ApiField)`
44+
- `getBotWidgetUrl(String, Site|String)`
45+
- `getDescription(String, Site|String)`
46+
- `getDiscordInvite(String, Site|String)`
47+
- `getFeatures(String, Site|String)`
48+
- `getFilteredList(String)`
49+
- `getIcon(String, Site|String)`
50+
- `getId(String, Site|String)`
51+
- `getLanguage(String, Site|String)`
52+
- `getList(String, Site|String)`
53+
- `getLists(String)`
54+
- `getName(String, Site|String)`
55+
- `getOwners(String, Site|String)`
56+
- `getTimeAdded(String, Site|String)`
57+
- `getUrl(String, Site|String)`
58+
- `isDefunct(String, Site|String)`
59+
- `isDiscordOnly(String, Site|String)`
60+
61+
----
62+
## v4
63+
64+
### v4.3.0
65+
- Adds new GetAction
66+
- `getBotListFeatures(String, Site|String)`: Returns a JSONArray with all features the bot list has.
67+
68+
### v4.2.5**
69+
- This was a test release for the attachment of zip files to the release. It failed.
70+
71+
### v4.2.4
72+
- Site updated:
73+
- Added [`ARCANE_BOTCENTER_XYZ`](https://arcane-botcenter.xyz)
74+
- Added [`DBLISTA_PL`](https://dblista.pl)
75+
76+
### v4.2.3
77+
- Site updated:
78+
- Deprecated `DISCORDBESTBOTS_XYZ`
79+
Use `DISCORDEXTREMELIST_XYZ` instead.
80+
81+
### v4.2.2
82+
- Site updated:
83+
- Removed `GLENNBOTLIST_XYZ`
84+
85+
### v4.2.1**
86+
- Removed unused imports.
87+
88+
### v4.2.0**
89+
- Added new get methods to GetAction:
90+
- `getDiscriminator(Long|String)`: Returns the discriminator of the bot or an empty String.
91+
- `getGitHub(Long|String)`: Returns GitHub url or an empty String.
92+
- `getLibrary(Long|String)`: Returns the library used by the bot or an empty String.
93+
- `getName(Long|String)`: Returns the name of the bot or an empty String.
94+
- `getPrefix(Long|String)`: Returns the command prefix of the bot or an empty String.
95+
- `getSupportLink(Long|String)`: Returns the support link (i.e. Discord invite) or an empty String.
96+
- `getWebsite(Long|String)`: Returns the website link of the bot or an empty String.
97+
- `getServerCount(Long|String id)` is now declared as `@Nullable` meaning result may be null.
98+
99+
### v4.1.1
100+
- `@DeprecatedSince` was slightly changed.
101+
102+
### v4.1.0
103+
- Merged the `@ReplacedWith` into the `@DeprecatedSince` annotation.
104+
105+
### v4.0.4
106+
- For unknown reason is the wrapper not available through normal downloads...
107+
108+
### v4.0.3
109+
- Fixed broken version system.
110+
111+
### v4.0.2*
112+
- Updated version system.
113+
- Releases are back to `#.#.#` format while dev builds are `#.#.#_#`
114+
115+
### v4.0.1_0
116+
- Updated message of RatelimitedException
117+
118+
### v4.0.0_0
119+
- Updated packages from `com.andre601` to `org.botblock`.
120+
**This is a breaking change.**
121+
122+
123+
____
124+
## v3
125+
126+
### v3.3.0_0
127+
- Version now has a build-number attached (used for Jenkin builds)
128+
129+
### v3.2.1
130+
- Site updated:
131+
- Added [`GLENNBOTLIST_XYZ`](https://glennbotlist.xyz)
132+
- Added [`CLOUD_BOTLIST_XYZ`](https://cloud-botlist.xyz)
133+
134+
### v3.2.0
135+
- Added `@DeprecatedSince` and `@ReplacedWith` annotations
136+
137+
### v3.1.0
138+
- Updated Gradle to v5.5
139+
- Added links to Jenkins for dev builds (Thanks CodeMC)
140+
- Dependencies updated:
141+
- Shadow: `4.0.4` to `5.2.0`
142+
- JDA: `4.0.0_73` to `4.1.0_81`
143+
144+
### v3.0.6
145+
- It's `targetCompatibility` not `targetCompitability`
146+
147+
### v3.0.5*
148+
- Fixed broken build.gradle
149+
150+
### v3.0.4*
151+
- RequestHandler was removed
152+
- Dependencies updated:
153+
- JDA: `4.0.0_70` to `4.0.0_73`
154+
155+
### v3.0.3
156+
- Same changes as [v3.0.2](#v302)
157+
158+
### v3.0.2*
159+
- Dependencies updated:
160+
- JDA: `4.0.0_61` to `4.0.0_70`
161+
162+
### v3.0.1
163+
- Site updated:
164+
- Deprecated `Site.DISCORDBOTS_ORG`.
165+
Use `Site.TOP_GG` instead.
166+
167+
### v3.0.0
168+
- Moved post and get methods to their own class
169+
- GetAction was created for all GET methods.
170+
- PostAction was created for all POST methods.
171+
- RequestHandler (`com.andre601.javabotblockapi.RequestHandler`) is now deprecated.
172+
- Site updated:
173+
- Added [`TOP_GG`](https://top.gg)
174+
- New methods `getInvite(Long|String)` and `getServerCount(Long|String)` added.
175+
- Timeouts for POST requests where made dynamic.
176+
- GET methods which used either an JDA or ShardManager instance got removed.
177+
- Renamed multiple methods:
178+
- `getBotInfo` and `getBotInfos` where renamed to `getBotListInfo`
179+
- `getAll` was renamed to `getBotInfo`
180+
- `startAutoPosting` was renamed to `enableAutoPost`
181+
- `stopAutoPosting` was renamed to `disableAutoPost`
182+
- Dependencies updated:
183+
- JDA: `4.0.0_52` to `4.0.0_61`
184+
- annotations: `17.0.0` to `18.0.0`
185+
186+
----
187+
## v2
188+
189+
### v2.3.9
190+
- Dependencies updated:
191+
- JDA: `4.0.0_48` to `4.0.0_52`
192+
- OkHttp: `4.2.1` to `4.2.2`
193+
194+
### v2.3.8
195+
- Implemented GitHub actions for automated releasing to Bintray.
196+
197+
### v2.3.6
198+
- 2nd attempt on integrating GitHub actions (failed)
199+
200+
### v2.3.5
201+
- Dependencies updated:
202+
- JDA: `4.0.0_45` to `4.0.0_48`
203+
- Updated to Java 11. It can still work with Java 8.
204+
205+
### v2.3.4
206+
- Sites updated:
207+
- Fixed wrong Site name from DISCORSDBESTBOTS\_XYZ to DISCORDBESTBOTS_XYZ
208+
209+
### v2.3.3
210+
- Site updated:
211+
- Added [`DISCORDEXTREMELIST_XYZ`](https://discordextremelist.xyz)
212+
- Removed `DISCORDBOTLIST_US_TO`
213+
- Removed GitHub Actions for now.
214+
215+
### v2.3.2
216+
- Attempt to fix GitHub's Actions.
217+
218+
### v2.3.1
219+
- Adding GitHub Actions to workflow.
220+
221+
### v2.3.0
222+
- Implemented caching to get methods.
223+
- `getBotlists()` and `getBotlist(String|Site site)` now require an additional String parameter.
224+
- Dependencies updated:
225+
- JDA: `4.0.0_40` to `4.0.0_45`
226+
227+
### v2.2.1
228+
- Dependencies updated:
229+
- JDA: `4.0.0_39` to `4.0.0_40`
230+
231+
### v2.2.0
232+
- Dependencies updated:
233+
- JDA: `4.BETA.0_32` to `4.0.0_39` (Official release of JDA v4)
234+
235+
### v2.1.1
236+
- Site updated:
237+
- Added [`YABL_XYZ`](https://yabl.xyz)
238+
239+
### v2.1.0
240+
- Added new Site enum to have easier methods and reliable sitenames
241+
242+
### v2.0.2
243+
- Dependencies updated
244+
- JDA: `4.BETA.0_30` to `4.BETA.0_32`
245+
246+
### v2.0.1
247+
- Dependencies updated:
248+
- JDA: `4.BETA.0_23` to `4.BETA.0_30`
249+
250+
### v2.0.0
251+
- Added new get methods for bot and botlist infos.
252+
- Dependencies updated:
253+
- JDA: Updated to `4.BETA.0_23`
254+
255+
----
256+
## v1
257+
258+
### v1.0.5
259+
- Updated minimal delay to 2 since rate limit is 1/120s.
260+
261+
### v1.0.4
262+
- Made RequestHandler an empty constructor.
263+
264+
### v1.0.3
265+
- Fixing JSONException when BotBlock.org has no 'failure' object present.
266+
267+
### v1.0.2
268+
- Moved JDA and ShardManager from BotBlockAPI to RequestHandler methods.
269+
270+
### v1.0.1
271+
- Make BotBlockAPI.Builder static. Fixes `Non enclosing class` error
272+
273+
### v1.0.0
274+
- First release

0 commit comments

Comments
 (0)