v2.0.0-20231105.202213
Pre-release📢 Overview
This snapshot contains lots of contributions that came in thanks to Hacktoberfest 2023. Many aspects of the library have been fundamentally improved. As a result, it was inevitable to introduce certain incompatible changes to the previous snapshot. You will almost certainly have to adapt and recompile your code. In the "Breaking Changes" section, we do our best to document these changes in the hope that the transition to this snapshot will be as painless as possible for you.
⭐ New Features
- Update SearchContent with all possible request params by @G10xy in #267
- Update API calling favourites related dto by @G10xy in #268
- Add missing report field to Notification entity by @PattaFeuFeu in #271
- Update ReportMethods by adding all request params by @G10xy in #277
- update Relationship model by @G10xy in #278
- Implement featured_tags API by @PattaFeuFeu in #283
- Deserialize JSON using KotlinX Serialization instead of Gson by @PattaFeuFeu in #270
- Add FeaturedTags to MastodonClient by @PattaFeuFeu in #289
- Return instance version from server info if available by @PattaFeuFeu in #290
- Add ktlint plugin code styling and formatting by @G10xy in #281
- Implement endorsements API by @PattaFeuFeu in #286
- Add domain_blocks API by @PattaFeuFeu in #287
- Add custom_emojis API methods by @PattaFeuFeu in #301
- Implement dismiss single notification request by @PattaFeuFeu in #302
- Feat Suggestion methods api by @G10xy in #291
- implement preferences API methods by @G10xy in #284
- Implement instance API methods by @PattaFeuFeu in #303
- Parse ISO 8601 date(time) strings as Instant by @PattaFeuFeu in #312
- Replace Single/Completable#create with fromCallable/fromAction by @PattaFeuFeu in #288
- Add Announcement API by @AnuraagReddy123 in #309
- Update enum classes with kotlinx annotations by @G10xy in #310
- #299 Implement oEmbed API methods by @PattaFeuFeu in #317
- Feat new push notifications methods by @G10xy in #316
🐞 Bug Fixes
- PreviewCard property fixes by @andregasser in #319
📔 Documentation
- Updated contributing file with project structure by @Yordaniss in #306
🔨 Dependency Upgrades
- Add dependabot for GitHub Actions workflow dependencies by @PattaFeuFeu in #275
- Bump actions/checkout from 3 to 4 by @dependabot in #276
- Bump com.autonomousapps.dependency-analysis from 1.21.0 to 1.22.0 by @dependabot in #258
- Bump com.autonomousapps.dependency-analysis from 1.22.0 to 1.24.0 by @dependabot in #264
- Bump com.autonomousapps.dependency-analysis from 1.24.0 to 1.25.0 by @dependabot in #272
- Bump com.github.ben-manes.versions from 0.47.0 to 0.48.0 by @dependabot in #257
- Bump com.github.ben-manes.versions from 0.48.0 to 0.49.0 by @dependabot in #273
- Bump io.reactivex.rxjava3:rxjava from 3.1.7 to 3.1.8 by @dependabot in #265
- Bump kotlin from 1.9.0 to 1.9.10 by @dependabot in #255
- Bump kotlin from 1.9.10 to 1.9.20 by @dependabot in #315
- Bump okhttp from 4.11.0 to 4.12.0 by @dependabot in #307
- Bump org.jlleitschuh.gradle.ktlint from 11.6.0 to 11.6.1 by @dependabot in #308
- Remove explicitly set kotlin-stdlib from Gradle scripts by @PattaFeuFeu in #285
- Upgrate to Gradle 8.4 plus buildSrc improvements by @andregasser in #274
⚡ Breaking Changes
RxJava, introduced in #288
We now no longer check if a downstream consumer has been disposed when emitting errors. Please check the Error Handling section of our RxJava documentation
Replace Gson with kotlinx.serialization, introduced in #270
Gson has been completely replaced with kotlinx.serialization.
Previously, we defined Gson
as an api
dependency so that it would be bundled with our library. This is no longer the case. We are also not exposing kotlinx.serialization in the same way.
MastodonClient
previously exposed the Gson serializer via getSerializer
. This method has been removed without replacement.
Dates returned as PrecisionDateTime
which wraps java.time.Instant
, introduced in #312
Previously, dates (e.g. created_at
, last_status_at
, …) were returned as the String
we received from the Mastodon API. This is usually a full ISO8601 in UTC but sometimes is just a local date.
We now return PrecisionDateTime
which can have different values depending on what we get from the API:
PrecisionDateTime.ValidPrecisionDateTime.ExactTime
- We got an exact string that pinpoints an instant in time up to a second or higher like
2023-10-28T13:37:42Z
that can be parsed as anInstant
- We got an exact string that pinpoints an instant in time up to a second or higher like
PrecisionDateTime.ValidPrecisionDateTime.StartOfDay
- We got a string that describes a date without a time like
2023-10-28
. We default to the start of the day when parsing anInstant
- We got a string that describes a date without a time like
PrecisionDateTime.InvalidPrecisionDateTime.Invalid
- The string we received is invalid and could not be parsed
PrecisionDateTime.InvalidPrecisionDateTime.Unavailable
- The parameter was unavailable, thus no parsing happened. This is the default value.
We have added helper methods for you to use:
PrecisionDateTime#mostPreciseInstantOrNull
PrecisionDateTime#mostPreciseOrFallback
PrecisionDateTime#isValid
Please check the documentation for further info.
Instance API methods, introduced in #303
The old getInstance
pointing to the v1
endpoint of the Instance APIs has been renamed to getInstanceV1
.
getInstance
now points to the v2
endpoint of the Instance APIs.
As the V1 variant has been deprecated since Mastodon 4.0.0, it is unlikely that you will need the V1 variant anymore and it is due for removal as soon as older Mastodon API versions have been completely deprecated by Mastodon.
Notification methods renaming, introduced in #302
getNotifications
has been renamed togetAllNotifications
clearNotifications
has been renamed todismissAllNotifications
PreviewCard property renaming / removal, introduced in #319
methodUrl
has been renamed toembedUrl
to match the official documentationhistory
has been removed as it is not needed in this context and would always be an empty list
Enum improvements, introduced in #310
- All enum values are now uppercase to be more closely aligned with Kotlin coding conventions (e.g.
Action.Hide
is nowAction.HIDE
) Filter.Context
has been renamed toFilter.FilterContext
Filter.Action
has been renamed toFilter.FilterAction
Notification.Type
has been renamed toNotification.NotificationType
ReportType
has been renamed toReportCategory
Filter.context
now returns aList<FilterContext>
instead of aList<String>
Filter.filterAction
now returns aFilterAction
object instead of aString
MastodonList.repliesPolicy
now returns aRepliesPolicy
object instead of aString
MediaAttachment.type
now returns aMediaType
object instead of aString
Notification.type
now returns aNotificationType
object instead of aString
PreviewCard.type
now returns aCardType
object instead of aString
FilterMethods.createFilter()
:context
parameter type has been changed fromList<Filter.Context>
toList<Filter.FilterContext>
FilterMethods.createFilter()
:filterAction
parameter type has been changed fromFilter.Action
toFilter.FilterAction
FilterMethods.updateFilter()
:context
parameter type has been changed fromList<Filter.Context>
toList<Filter.FilterContext>
FilterMethods.updateFilter()
:filterAction
parameter type has been changed fromFilter.Action
toFilter.FilterAction
NotificationMethods.getAllNotifications()
:excludeTypes
parameter type has been changed fromList<Notification.Type>
toList<Notification.NotificationType>
ReportMethods.fileReport()
:category
parameter type has been changed fromReportType
toReportCategory
Addition of preferences API methods, introduced in #284
ScheduledStatus.Parameters.visibility
now returns an object of typeVisibility
instead ofString
Status.visibility
now returns an object of typeVisibility
instead ofString
StatusMethods.postStatus()
:visibility
parameter type has been changed fromStatus.Visibility
toVisibility
StatusMethods.postPoll()
:visibility
parameter type has been changed fromStatus.Visibility
toVisibility
StatusMethods.scheduleStatus()
:visibility
parameter type has been changed fromStatus.Visibility
toVisibility
StatusMethods.schedulePoll()
:visibility
parameter type has been changed fromStatus.Visibility
toVisibility
StatusMethods.reblogStatus()
:visibility
parameter type has been changed fromStatus.Visibility
toVisibility
Range class changes, introduced in #268
Range
has received an additional constructor parameterminId
Link
has received an additional constructor parameterminId
Additional search parameters, introduced in #267
SearchMethods.searchContent
got additional paramters for querying:type
,following
,excludeUnreviewed
,accountId
,maxId
,minId
,limit
,offset
Various class / method name changes, introduced in 3d475cc
RxCustomEmojisMethods
has been renamed toRxCustomEmojiMethods
RxCustomEmojisMethods.getAllCustomEmoji()
has been renamed toRxCustomEmojiMethods.getAllCustomEmojis()
CustomEmojisMethods
has been renamed toCustomEmojiMethods
CustomEmojisMethods.getAllCustomEmoji()
has been renamed toCustomEmojiMethods.getAllCustomEmojis()
RxDomainBlocksMethods
has been renamed toRxDomainBlockMethods
DomainBlocksMethods
has been renamed toDomainBlockMethods
RxFeaturedTagsMethods
has been renamed toRxFeaturedTagMethods
❤️ Contributors
Thank you to all the contributors who worked on this release:
- @G10xy made their first contribution in #267
- @PattaFeuFeu made their first contribution in #275
- @Yordaniss made their first contribution in #306
- @AnuraagReddy123 made their first contribution in #309
Full Changelog: v2.0.0-20230902.213631...v2.0.0-20231105.202213