Skip to content

Commit

Permalink
chore: prepare 0.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMrMilchmann committed Jul 22, 2024
1 parent 31be9bc commit 9f1ed05
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/changelog/0.5.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### 0.5.0

_Not Released Yet_
_Released 2024 Jul 22_

#### Overview

Expand Down
4 changes: 2 additions & 2 deletions docs/changelog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

### Version History

* ????-??-?? [0.5.0](0.5.0.md) (TBD; work in progress)
* 2022-07-27 [0.4.0](0.4.0.md) (latest)
* 2024-07-22 [0.5.0](0.5.0.md) (latest)
* 2022-07-27 [0.4.0](0.4.0.md)
* 2021-07-14 [0.3.0](0.3.0.md)
* 2021-01-25 [0.2.0](0.2.0.md)
* 2020-12-24 [0.1.0](0.1.0.md)
Expand Down
63 changes: 63 additions & 0 deletions docs/changelog/full.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
### 0.5.0

_Released 2024 Jul 22_

#### Overview

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`.

#### 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.


---

### 0.4.0

_Released 2022 Jul 27_
Expand Down
70 changes: 52 additions & 18 deletions docs/changelog/latest.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,59 @@
### 0.4.0
### 0.5.0

_Released 2022 Jul 27_
_Released 2024 Jul 22_

#### Overview

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

- Updated to [api-generator](https://github.com/GW2ToolBelt/api-generator) to [0.6.0](https://github.com/GW2ToolBelt/api-generator/releases/tag/v0.6.0).
- Cleaned up caching.
- Renamed `CacheAccessor` to `CacheAccess`.
- Cache time overwrites were removed for now.
- Cleaned up the `RateLimiter` interface and related hooks.
- A default `TokenBucketRateLimiter` implementation is now available.
- API clients are now configured to use a rate limiter by default.
- Introduced the `DecodingResult` abstraction to improve error-handling
capabilities for malformed data from the API.
- Introduced the `ResponseHeaders` abstraction that wraps headers of a
`Response` and provides utilities.
- Improved documentation throughout the entire library.
- 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`.

#### Breaking Changes

- All modules now require Kotlin 1.7
- JVM modules now require Java 11
- The library was significantly reworked and many things were either renamed or
relocated. Detailed migration guidelines are not available for this release.
- 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.

0 comments on commit 9f1ed05

Please sign in to comment.