-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add data class for AnnouncementReactionReceived payload
- Loading branch information
1 parent
27af088
commit 664ba8a
Showing
3 changed files
with
34 additions
and
4 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
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
31 changes: 31 additions & 0 deletions
31
bigbone/src/main/kotlin/social/bigbone/api/entity/streaming/StreamingAnnouncementReaction.kt
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package social.bigbone.api.entity.streaming | ||
|
||
import kotlinx.serialization.SerialName | ||
import social.bigbone.api.entity.Reaction | ||
|
||
/** | ||
* "Hash" returned as part of [ParsedStreamEvent.AnnouncementReactionReceived] containing information on the reaction. | ||
* | ||
* This is slightly different from [Reaction] and thus is in its own class here. | ||
* | ||
* @see <a href="https://docs.joinmastodon.org/methods/streaming/#events">Mastodon API streaming events</a> | ||
*/ | ||
data class StreamingAnnouncementReaction( | ||
/** | ||
* The emoji used for the reaction. Either a unicode emoji, or a custom emoji’s shortcode. | ||
*/ | ||
@SerialName("name") | ||
val name: String, | ||
|
||
/** | ||
* The total number of users who have added this reaction. | ||
*/ | ||
@SerialName("count") | ||
val count: Int, | ||
|
||
/** | ||
* The ID of the announcement in the database. | ||
*/ | ||
@SerialName("announcement_id") | ||
val announcementId: String | ||
) |