|
1 |
| -### 0.5.0 |
| 1 | +### 0.6.0 |
2 | 2 |
|
3 |
| -_Released 2024 Jul 22_ |
| 3 | +_Released 2024 Oct 25_ |
4 | 4 |
|
5 |
| -#### Overview |
| 5 | +#### Fixes |
6 | 6 |
|
7 |
| -This release is a long overdue major update to the project. The entire API |
8 |
| -surface has been touched up and improved to provide a better developer |
9 |
| -experience. |
10 |
| - |
11 |
| -The most significant change is the decoupling of request creation from request |
12 |
| -execution: |
13 |
| - |
14 |
| -```kotlin |
15 |
| -// Old |
16 |
| -suspend fun main() { |
17 |
| - val client = GW2APIClient(...) |
18 |
| - val requestBuilder = client.gw2v2Build() |
19 |
| - |
20 |
| - val request = coroutineScope { requestBuilder.execute(this) } |
21 |
| - val response = request.get() |
22 |
| - |
23 |
| - val gw2v2Build = response.data.getOrNull() ?: error("Could not decode request") |
24 |
| - |
25 |
| - println("Build ID: ${gw2v2Build.id}") |
26 |
| -} |
27 |
| -``` |
28 |
| - |
29 |
| -Whereas the old way to create request contained a lot of ceremony to support |
30 |
| -asynchronous and synchronous execution at the same time, the new way is much |
31 |
| -more straightforward: |
32 |
| - |
33 |
| -```kotlin |
34 |
| -// New |
35 |
| -suspend fun main() { |
36 |
| - val client = Gw2ApiClient() |
37 |
| - val gw2v2Build = client.executeAsync(gw2v2Build()).dataOrNull ?: error("Failed to fetch build ID.") |
38 |
| - |
39 |
| - println("Build ID: {$gw2v2Build.id}") |
40 |
| -} |
41 |
| -``` |
42 |
| - |
43 |
| -There is no full migration guide available. Please refer to the updated |
44 |
| -documentation for more information. |
45 |
| - |
46 |
| -#### Improvements |
47 |
| - |
48 |
| -- Added an explicit Java module descriptor for `api-types`. |
49 |
| -- Added a simple API to allow blocking execution of requests on the JVM. |
50 |
| - - This is especially useful in combination with virtual threads. |
51 |
| -- Replaced placeholder exception that is thrown when an unknown type is |
52 |
| - encountered with a `SerializationException`. |
53 |
| -- Migrated to schema version `2022-03-23T19:00:00.000Z`. |
| 7 | +- Fixed a critical bug in the path parameter substitution logic that caused |
| 8 | + requests with path parameters to target invalid endpoints. |
54 | 9 |
|
55 | 10 | #### Breaking Changes
|
56 | 11 |
|
57 |
| -- Migrated to schema version `2022-03-23T19:00:00.000Z`. |
58 |
| -- The entire API client has been rewritten to decouple request creation from |
59 |
| - execution. Please see the updated documentation for more information. |
| 12 | +- `api-client-ktor` now requires Ktor 3. |
0 commit comments