commonMain.app.bsky.feed.Token.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
package app.bsky.feed
import kotlin.String
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.AtpEnum
import sh.christian.ozone.api.runtime.stringEnumSerializer
public class TokenSerializer : KSerializer by stringEnumSerializer(Token::safeValueOf)
@Serializable(with = TokenSerializer::class)
public sealed class Token(
override val `value`: String,
) : AtpEnum() {
/**
* Request that less content like the given feed item be shown in the feed
*/
public data object RequestLess : Token("app.bsky.feed.defs#requestLess")
/**
* Request that more content like the given feed item be shown in the feed
*/
public data object RequestMore : Token("app.bsky.feed.defs#requestMore")
/**
* User clicked through to the feed item
*/
public data object ClickthroughItem : Token("app.bsky.feed.defs#clickthroughItem")
/**
* User clicked through to the author of the feed item
*/
public data object ClickthroughAuthor : Token("app.bsky.feed.defs#clickthroughAuthor")
/**
* User clicked through to the reposter of the feed item
*/
public data object ClickthroughReposter : Token("app.bsky.feed.defs#clickthroughReposter")
/**
* User clicked through to the embedded content of the feed item
*/
public data object ClickthroughEmbed : Token("app.bsky.feed.defs#clickthroughEmbed")
/**
* Feed item was seen by user
*/
public data object InteractionSeen : Token("app.bsky.feed.defs#interactionSeen")
/**
* User liked the feed item
*/
public data object InteractionLike : Token("app.bsky.feed.defs#interactionLike")
/**
* User reposted the feed item
*/
public data object InteractionRepost : Token("app.bsky.feed.defs#interactionRepost")
/**
* User replied to the feed item
*/
public data object InteractionReply : Token("app.bsky.feed.defs#interactionReply")
/**
* User quoted the feed item
*/
public data object InteractionQuote : Token("app.bsky.feed.defs#interactionQuote")
/**
* User shared the feed item
*/
public data object InteractionShare : Token("app.bsky.feed.defs#interactionShare")
public data class Unknown(
public val rawValue: String,
) : Token(rawValue)
public companion object {
public fun safeValueOf(`value`: String): Token = when (value) {
"app.bsky.feed.defs#requestLess" -> RequestLess
"app.bsky.feed.defs#requestMore" -> RequestMore
"app.bsky.feed.defs#clickthroughItem" -> ClickthroughItem
"app.bsky.feed.defs#clickthroughAuthor" -> ClickthroughAuthor
"app.bsky.feed.defs#clickthroughReposter" -> ClickthroughReposter
"app.bsky.feed.defs#clickthroughEmbed" -> ClickthroughEmbed
"app.bsky.feed.defs#interactionSeen" -> InteractionSeen
"app.bsky.feed.defs#interactionLike" -> InteractionLike
"app.bsky.feed.defs#interactionRepost" -> InteractionRepost
"app.bsky.feed.defs#interactionReply" -> InteractionReply
"app.bsky.feed.defs#interactionQuote" -> InteractionQuote
"app.bsky.feed.defs#interactionShare" -> InteractionShare
else -> Unknown(value)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy