utapi-rs 0.1.2

A Rust wrapper around the UploadThing API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use serde::Deserialize;

// Represents a single upload URL and its associated key.
#[derive(Debug, Deserialize)]
pub struct UploadthingUrl {
    /// The URL to which the thing should be uploaded.
    pub url: String,
    /// The key associated with the uploaded thing, used for referencing it.
    pub key: String,
}

// A response containing a list of upload URLs and their keys.
#[derive(Debug, Deserialize)]
pub struct UploadthingUrlsResponse {
    /// A vector of `UploadthingUrl` objects, each containing a URL and key.
    pub data: Vec<UploadthingUrl>,
}