|
1 | | -# 2.2.1 |
2 | | -## Added |
3 | | -- `CreditPool#getClient()` |
4 | | - |
5 | | -## Fixed |
6 | | -- Objects returned by `ExarotonClient#getServers` and `ExarotonClient#getCreditPools` are now correctly initialized |
7 | | - |
8 | | -# 2.2.0 |
9 | | - |
10 | | -## Added |
11 | | -- `Server#getSocketAddress()` which returns an `InetSocketAddress` of the server's IP and port if the server is online |
12 | | - |
13 | | -# 2.1.0 |
14 | | - |
15 | | -## Added |
16 | | -- `ServerConfig#setOptions(Collection<ConfigOption<?>>)` |
17 | | -- `ServerConfig#setOptions(Map<String, ConfigOption<?>>)` |
18 | | - |
19 | | -# 2.0.0 |
20 | | - |
21 | | -## Breaking Changes |
22 | | -## Java 11 |
23 | | -This library now requires Java 11 or higher. |
24 | | - |
25 | | -## Async API |
26 | | -All methods that make requests to the Exaroton API are now asynchronous. This means that all methods that return a value |
27 | | -now return a `CompletableFuture` instead. To get the result of the request you can use `CompletableFuture#get()` or |
28 | | -`CompletableFuture#join()`. |
29 | | - |
30 | | -This also changes where exceptions are thrown. Now the following rules apply: |
31 | | -- IOExceptions are thrown directly by the API methods |
32 | | -- APIExceptions cause the CompletableFuture to complete exceptionally |
33 | | - |
34 | | -If you use `join()` or `get()` a `CompletionException` containing the `APIException` will be thrown. |
35 | | - |
36 | | -## Fetch methods |
37 | | -Many objects can be obtained from the API client without fetching their data (e.g. Server, CreditPool, ServerFile, ...). |
38 | | -The method to fetch their data has been renamed from `get` to `fetch`. It now also offers an override with a boolean |
39 | | -parameter that can be used to only fetch the object once `server.fetch(false)`. |
40 | | - |
41 | | -## ServerStatus |
42 | | -The `ServerStatus` class is now an enum instead of a class with static `int` fields. Each status has a numeric |
43 | | -value (`getValue`), a display name (`getName`) and a brand color (`getColor`). |
44 | | - |
45 | | -If a status code is unknown because the API client has not been updated `OFFLINE` will be returned. |
46 | | - |
47 | | -### SLF4J Implementation |
48 | | -This library no longer depends directly on any SLF4J implementation. If you want to see log messages |
49 | | -from this library, you must include an SLF4J implementation in your project. |
50 | | - |
51 | | -### API Requests |
52 | | - |
53 | | -#### Request Bodies |
54 | | -`ApiRequest#getBody()` and `ApiRequest#getInputStream()` have been replaced by `ApiRequest#getBodyPublisher()`. For a |
55 | | -JSON body you can use `ApiRequest#jsonBodyPublisher(Object)`. This only affects users who extended the request classes. |
56 | | - |
57 | | -`PutFileDataRequest`'s constructor has been changed to accept a `Supplier<InputStream>` instead of an `InputStream`. |
58 | | - |
59 | | -#### Request Methods |
60 | | -`ApiRequest#requestRaw()`, `ApiRequest#requestString()` and `ApiRequest#request()` have been replaced by |
61 | | -`ExarotonClient#request(ApiRequest, HttpResponse.BodyHandler)` use the respective body handlers to get an input stream, |
62 | | -string or object. |
63 | | - |
64 | | -### WebSockets |
65 | | -The `java-websocket` library has been replaced by the built-in Java 11 websocket implementation. Websocket connections |
66 | | -are now automatically created when a subscriber is registered and closed when the last subscriber is removed. Manually |
67 | | -closing a connection using `Server#unsubscribe()` is still supported. This method does not throw an exception if there |
68 | | -is no connection to close. |
69 | | - |
70 | | -The debug/error handler methods have been removed. Errors and debug messages are now exclusively logged using SLF4J |
71 | | - |
72 | | -#### Subscribers |
73 | | -The `Subscriber` classes are now interfaces and their methods have been renamed to make the more explicit and reduce |
74 | | -the chance of conflicts with other overrides. |
75 | | - |
76 | | -### Other |
77 | | -- Arrays have been Replaced by Collection's in almost all places |
78 | | -- Nullable return types have been replaced by Optional's |
79 | | -- Public final properties have been replaced by getters |
80 | | -- Config options now return a generic type instead of `Object` |
81 | | -- Renamed `ServerFile#getInfo` to `ServerFile#get` |
82 | | -- Removed `ExarotonClient#getGson()` and `WebsocketClient#getGson()` |
83 | | -- Removed `Server#setClient` and `CreditPool#setClient` |
84 | | -- Removed `ExarotonClient#getBaseUrl()` and `ExarotonClient#createConnection(String, String)` |
85 | | -- Many classes are now final |
86 | | -- Added `ApiStatus` annotations to many classes and methods |
87 | | -- Removed `ExarotonClient#getApiToken()` |
88 | | -- `ExarotonClient#setProtocol` and `ExarotonClient#getProtocol` have been removed as HTTP is not supported by the API |
89 | | - |
90 | | -## Improvements |
91 | | -- Update dependencies |
92 | | -- Make jetbrains annotations compile only |
| 1 | +## Build System |
| 2 | +- Migrate to new Maven Central publishing system. |
0 commit comments