-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a37cfd5
commit 8cf7879
Showing
4 changed files
with
25 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
### 0.6.0 | ||
|
||
_Not Released Yet_ | ||
_Released 2024 Oct 25_ | ||
|
||
#### Fixes | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,12 @@ | ||
### 0.5.0 | ||
### 0.6.0 | ||
|
||
_Released 2024 Jul 22_ | ||
_Released 2024 Oct 25_ | ||
|
||
#### Overview | ||
#### Fixes | ||
|
||
This release is a long overdue major update to the project. The entire API | ||
surface has been touched up and improved to provide a better developer | ||
experience. | ||
|
||
The most significant change is the decoupling of request creation from request | ||
execution: | ||
|
||
```kotlin | ||
// Old | ||
suspend fun main() { | ||
val client = GW2APIClient(...) | ||
val requestBuilder = client.gw2v2Build() | ||
|
||
val request = coroutineScope { requestBuilder.execute(this) } | ||
val response = request.get() | ||
|
||
val gw2v2Build = response.data.getOrNull() ?: error("Could not decode request") | ||
|
||
println("Build ID: ${gw2v2Build.id}") | ||
} | ||
``` | ||
|
||
Whereas the old way to create request contained a lot of ceremony to support | ||
asynchronous and synchronous execution at the same time, the new way is much | ||
more straightforward: | ||
|
||
```kotlin | ||
// New | ||
suspend fun main() { | ||
val client = Gw2ApiClient() | ||
val gw2v2Build = client.executeAsync(gw2v2Build()).dataOrNull ?: error("Failed to fetch build ID.") | ||
|
||
println("Build ID: {$gw2v2Build.id}") | ||
} | ||
``` | ||
|
||
There is no full migration guide available. Please refer to the updated | ||
documentation for more information. | ||
|
||
#### Improvements | ||
|
||
- Added an explicit Java module descriptor for `api-types`. | ||
- Added a simple API to allow blocking execution of requests on the JVM. | ||
- This is especially useful in combination with virtual threads. | ||
- Replaced placeholder exception that is thrown when an unknown type is | ||
encountered with a `SerializationException`. | ||
- Migrated to schema version `2022-03-23T19:00:00.000Z`. | ||
- Fixed a critical bug in the path parameter substitution logic that caused | ||
requests with path parameters to target invalid endpoints. | ||
|
||
#### Breaking Changes | ||
|
||
- Migrated to schema version `2022-03-23T19:00:00.000Z`. | ||
- The entire API client has been rewritten to decouple request creation from | ||
execution. Please see the updated documentation for more information. | ||
- `api-client-ktor` now requires Ktor 3. |