shrike 0.1.1

AT Protocol library for Rust
Documentation
// Code generated by lexgen. DO NOT EDIT.

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UnspeccedGetSuggestionsSkeletonParams {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cursor: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
    /// DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub relative_to_did: Option<String>,
    /// DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub viewer: Option<String>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UnspeccedGetSuggestionsSkeletonOutput {
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub actors: Vec<crate::api::app::bsky::UnspeccedDefsSkeletonSearchActor>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cursor: Option<String>,
    /// DEPRECATED: use recIdStr instead.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub rec_id: Option<i64>,
    /// Snowflake for this recommendation, use when submitting recommendation events.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub rec_id_str: Option<String>,
    /// DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub relative_to_did: Option<crate::syntax::Did>,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// UnspeccedGetSuggestionsSkeleton — Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions
pub async fn unspecced_get_suggestions_skeleton(
    client: &crate::xrpc::Client,
    params: &UnspeccedGetSuggestionsSkeletonParams,
) -> Result<UnspeccedGetSuggestionsSkeletonOutput, crate::xrpc::Error> {
    client
        .query("app.bsky.unspecced.getSuggestionsSkeleton", params)
        .await
}