shrike 0.1.0

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

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RepoUploadBlobOutput {
    pub blob: crate::api::Blob,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// RepoUploadBlob — Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is n...
pub async fn repo_upload_blob(
    client: &crate::xrpc::Client,
    body: Vec<u8>,
    content_type: &str,
) -> Result<RepoUploadBlobOutput, crate::xrpc::Error> {
    let v = client
        .procedure_raw("com.atproto.repo.uploadBlob", body, content_type)
        .await?;
    serde_json::from_value(v).map_err(|e| crate::xrpc::Error::Xrpc {
        status: 0,
        error: "DeserializationError".to_string(),
        message: e.to_string(),
    })
}