emojireactions: add entities and api endpoints
This commit is contained in:
parent
25e05f06ad
commit
1b4f1eea0e
|
@ -24,4 +24,12 @@ data class Emoji(
|
|||
val shortcode: String,
|
||||
val url: String,
|
||||
@SerializedName("visible_in_picker") val visibleInPicker: Boolean?
|
||||
) : Parcelable
|
||||
) : Parcelable
|
||||
|
||||
@Parcelize
|
||||
data class EmojiReaction(
|
||||
val emoji: String,
|
||||
val count: Int,
|
||||
val reacted: Boolean,
|
||||
val accounts: List<Account>? // only for emoji_reactions_by
|
||||
) : Parcelable
|
||||
|
|
|
@ -173,7 +173,8 @@ data class Status(
|
|||
|
||||
data class PleromaStatus(
|
||||
@SerializedName("thread_muted") var threadMuted: Boolean?,
|
||||
@SerializedName("conversation_id") val conversationId: Int?
|
||||
@SerializedName("conversation_id") val conversationId: Int?,
|
||||
@SerializedName("emoji_reactions") val emojiReactions: List<EmojiReaction>?
|
||||
)
|
||||
|
||||
data class Mention (
|
||||
|
|
|
@ -583,4 +583,21 @@ interface MastodonApi {
|
|||
|
||||
@GET
|
||||
fun getNodeinfo(@Url url: String) : Single<NodeInfo>
|
||||
|
||||
@POST("api/v1/pleroma/statuses/{id}/react_with_emoji")
|
||||
fun reactWithEmoji(
|
||||
@Path("id") statusId: String,
|
||||
@Field("emoji") emoji: String
|
||||
): Single<Status>
|
||||
|
||||
@POST("api/v1/pleroma/statuses/{id}/unreact_with_emoji")
|
||||
fun unreactWithEmoji(
|
||||
@Path("id") statusId: String,
|
||||
@Field("emoji") emoji: String
|
||||
): Single<Status>
|
||||
|
||||
@GET("api/v1/pleroma/statuses/{id}/emoji_reactions_by")
|
||||
fun reactWithEmoji(
|
||||
@Path("id") statusId: String
|
||||
): Single<Status>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue