commonMain.app.bsky.unspecced.getSuggestionsSkeleton.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!
@file:Suppress("DEPRECATION")
package app.bsky.unspecced
import kotlin.Any
import kotlin.Long
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.Did
/**
* @param viewer DID of the account making the request (not included for public/unauthenticated
* queries). Used to boost followed accounts in ranking.
* @param relativeToDid DID of the account to get suggestions relative to. If not provided,
* suggestions will be based on the viewer.
*/
@Serializable
public data class GetSuggestionsSkeletonQueryParams(
/**
* DID of the account making the request (not included for public/unauthenticated queries). Used
* to boost followed accounts in ranking.
*/
public val viewer: Did? = null,
public val limit: Long? = 50,
public val cursor: String? = null,
/**
* DID of the account to get suggestions relative to. If not provided, suggestions will be based
* on the viewer.
*/
public val relativeToDid: Did? = null,
) {
init {
require(limit == null || limit >= 1) {
"limit must be >= 1, but was $limit"
}
require(limit == null || limit <= 100) {
"limit must be <= 100, but was $limit"
}
}
public fun asList(): List> = buildList {
add("viewer" to viewer)
add("limit" to limit)
add("cursor" to cursor)
add("relativeToDid" to relativeToDid)
}
}
/**
* @param relativeToDid DID of the account these suggestions are relative to. If this is returned
* undefined, suggestions are based on the viewer.
*/
@Serializable
public data class GetSuggestionsSkeletonResponse(
public val cursor: String? = null,
public val actors: List,
/**
* DID of the account these suggestions are relative to. If this is returned undefined,
* suggestions are based on the viewer.
*/
public val relativeToDid: Did? = null,
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy