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 GraphGetListsParams {
    /// The account (actor) to enumerate lists from.
    pub actor: String,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cursor: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
    /// Optional filter by list purpose. If not specified, all supported types are returned.
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub purposes: Vec<String>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GraphGetListsOutput {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub cursor: Option<String>,
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub lists: Vec<crate::api::app::bsky::GraphDefsListView>,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// GraphGetLists — Enumerates the lists created by a specified account (actor).
pub async fn graph_get_lists(
    client: &crate::xrpc::Client,
    params: &GraphGetListsParams,
) -> Result<GraphGetListsOutput, crate::xrpc::Error> {
    client.query("app.bsky.graph.getLists", params).await
}