Skip to content

Releases: slackhq/EitherNet

1.9.0

05 Jun 19:12
Compare
Choose a tag to compare
  • Update to Kotlin 2.0.0.

What's Changed

Full Changelog: 1.8.1...1.9.0

1.8.1

12 Feb 01:15
Compare
Choose a tag to compare
  • Fix: (hopefully) fix kdocs publishing for test fixtures.
  • Update to Kotlin 1.9.22.

What's Changed

Full Changelog: 1.8.0...1.8.1

1.8.0

03 Nov 21:10
Compare
Choose a tag to compare
  • Fix: Deprecate old fold() functions and introduce new ones that use the underlying value rather than Success. This was an oversight in the previous implementation. Binary compatibility is preserved.
  • Enhancement: Mark functions inline where possible to allow carried over context (i.e. in suspend functions, etc)
  • Enhancement: Use contracts to inform the compiler about possible calls to lambdas.
  • New: Add fluent onSuccess and onFailure* functional extension APIs to ApiResult.

What's Changed

Full Changelog: 1.7.0...1.8.0

1.7.0

02 Nov 16:39
Compare
Choose a tag to compare
  • Enhancement: Add new ApiResult<*, *>.successOrNothing() and ApiResult.Failure<*>.exceptionOrNull() functional extension APIs.
  • Update to Kotlin 1.9.20.

What's Changed

Full Changelog: 1.6.0...1.7.0

1.6.0

26 Sep 19:25
Compare
Choose a tag to compare
  • Enhancement: Add shouldRetry parameter to retryWithExponentialBackoff() to allow conditional short-circuiting of retries.

What's Changed

Full Changelog: 1.5.0...1.6.0

1.5.0

08 Aug 22:30
Compare
Choose a tag to compare
  • New: Add new successOrNull, successOrElse, and fold functional extension APIs to ApiResult. These allow easy happy path-ing in user code to coerce results into a concrete value.
  • Update to Kotlin 1.9.0.

1.4.1

31 May 16:21
Compare
Choose a tag to compare
  • Enhancement: Gracefully handle Unit-returning endpoints when encountering a 204 or 205 response code.

Thanks to @JDSM01 for contributing to this release!

1.4.0

19 May 16:39
Compare
Choose a tag to compare

Happy new year!

A common pattern in making network requests is to retry with exponential backoff. EitherNet now ships with a highly configurable retryWithExponentialBackoff() function for this case.

// Defaults for reference
val result = retryWithExponentialBackoff(
  maxAttempts = 3,
  initialDelay = 500.milliseconds,
  delayFactor = 2.0,
  maxDelay = 10.seconds,
  jitterFactor = 0.25,
  onFailure = null, // Optional Failure callback for logging
) {
    api.getData()
}
  • Update to Kotlin 1.8.21.
  • Update to Kotlin Coroutines 1.7.1.
  • EitherNet now depends on org.jetbrains.kotlinx:kotlinx-coroutines-core.

1.3.1

31 Dec 18:37
Compare
Choose a tag to compare
  • Fix missing Gradle module metadata for test fixtures.

1.3.0

30 Dec 15:35
Compare
Choose a tag to compare
  • Update to Kotlin 1.8.0.
  • Fix: Fix exception on annotation traversal when target is not present
  • Fix: Publish test-fixtures artifact sources.
  • Update to JVM target 11.

What's Changed

New Contributors

Full Changelog: 1.2.1...1.3.0