v2.0.0-20231228.215524
Pre-release📢 Overview
This snapshot brings many new features and functionalities, but also various breaking changes. One of the highlights of this release is certainly the refactoring of the streaming API which has now been implemented based on the WebSocket protocol. Please read the “Breaking Changes” section carefully to understand where you should expect changes to your code. Happy holidays! 🎄
⭐ New Features
- Add followed tags method by @PattaFeuFeu in #355
- Add admin/dimensions API methods by @PattaFeuFeu in #352
- Add emails methods by @PattaFeuFeu in #354
- Implement Trends API by @PattaFeuFeu in #360
- Timelines: Add missing query parameters for full support by @PattaFeuFeu in #368
- lists: Add “exclusive” parameter for full support by @PattaFeuFeu in #379
- Add Admin::DomainBlocks entity and methods by @PattaFeuFeu in #397
- Add Admin::EmailDomainBlock methods by @PattaFeuFeu in #400
- Add Admin::CanonicalEmailBlocks methods by @PattaFeuFeu in #403
- Rewrite streaming API to use websocket by @PattaFeuFeu in #383
- Add ip block admin-related methods by @G10xy in #392
- Add release script that reacts on tags like v2.0.0 by @PattaFeuFeu in #336
- Replace missed Single#create with Single#fromCallable by @PattaFeuFeu in #373
- oAuth: Add missing function parameters, add revoke token method by @PattaFeuFeu in #370
- followRequests: Change return to Relationship by @PattaFeuFeu in #371
- RxAppMethods: Add missing
verifyCredentials
by @PattaFeuFeu in #374 - Mock server testing instead of hitting actual website by @PattaFeuFeu in #390
- Update scopes used in OAuth by @bocops in #382
🐞 Bug Fixes
- Propagate exceptions occurring during client instantiation by @PattaFeuFeu in #353
- Remove defaults for limit parameter + do not verify values by @PattaFeuFeu in #367
📔 Documentation
- Update pull request template by @andregasser in #356
- Update markdown documentation in the root folder of the project by @andregasser in #359
- Add Slack link to README.md by @andregasser in #362
- Update api coverage documentation to match current library state by @PattaFeuFeu in #361
- Create SECURITY.md by @andregasser in #363
- Add missing kDocs to all RxJava implementations by @PattaFeuFeu in #372
- Hide PR template suggestions even if they’re kept by @PattaFeuFeu in #391
- PR template: Add check boxes to Optional Checks section by @PattaFeuFeu in #401
- Fix broken Admin::IpBlocks kDoc links by @PattaFeuFeu in #402
🔨 Dependency Upgrades
- Bump kotlin from 1.9.20 to 1.9.21 by @dependabot in #357
- Bump io.gitlab.arturbosch.detekt from 1.23.3 to 1.23.4 by @dependabot in #358
- Upgrade Gradle from 8.4 to 8.5 by @andregasser in #369
- Bump kotlinx-serialization-json from 1.6.1 to 1.6.2 by @dependabot in #377
- Bump com.autonomousapps.dependency-analysis from 1.26.0 to 1.27.0 by @dependabot in #375
- Bump com.gradle.enterprise from 3.15.1 to 3.16 by @dependabot in #388
- Bump com.autonomousapps.dependency-analysis from 1.27.0 to 1.28.0 by @dependabot in #395
- Bump com.gradle.enterprise from 3.16 to 3.16.1 by @dependabot in #394
- Bump github/codeql-action from 2 to 3 by @dependabot in #393
- Bump kotlin from 1.9.21 to 1.9.22 by @dependabot in #398
⚡ Breaking Changes
Streaming API WebSocket Refactoring, introduced in #383
With the replacement came loads of breaking changes. I’ve replaced the previous Handler and Shutdownable with a leaner callback and an extension of Closeable, so now the signatures, while similar, are actually quite different for callers.
It’s no longer necessary (or even possible) to call useStreamingApi when building the MastodonClient.
Please check our updated Usages section about the streaming API or one of the following samples to see how to utilise the streaming API:
Mastodon Client Builder, introduced in #353
MastodonClient.Builder#build
may now throw a BigBoneClientInstantiationException.
ListMethods#createList
Changes, introduced in #379
ListMethods#createList
parameter repliesPolicy
now is null
by default and is defined as nullable. Likely won’t break anything, but just in case…
OAuthMethods Parameter Changes, introduced in #370
OAuthMethods#getOAuthUrl
: scope
moved from second to third parameter, switching places with redirectUri
, and also became optional (=> nullable).
Rx Return Type Changes, introduced in #371
RxFollowRequestMethods#authorizeFollowRequest
and RxFollowRequestMethods#rejectFollowRequest
now return Single<Relationship>
instead of Completable
.
Update Scopes Used in OAuth, introduced in #382
Scope
constructor can no longer be called without explicitly enumerating scopes that should be requested.Scope.NAME
enum has been replaced with hierarchically arranged scope definitions in the class. Example:Scope.Name.READ
becomesScope.READ.ALL
.- Existing
FOLLOW
scope has been removed. Use individual child scopes ofREAD
andWRITE
instead. - Existing
ALL
scope has been removed. Use individual scopes necessary for your use case instead.
Exception Handling Changes, introduced in #367
The following no longer throw or declare an IllegalArgumentException
, so any try/catch
can be removed:
DomainBlockMethods#getDomainBlocks
EndorsementMethods#getEndorsements
FollowedTagMethods#viewAllFollowedTags
SuggestionMethods#getSuggestions
❤️ Contributors
Thank you to all the contributors who worked on this release:
Full Changelog: v2.0.0-20231125.173242...v2.0.0-20231228.215524