grain.social is a photo sharing platform built on atproto.
1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Deserialize, Serialize)]
4pub struct AspectRatio {
5 pub width: f32,
6 pub height: f32,
7}
8
9#[derive(Debug, Clone, Deserialize, Serialize)]
10pub struct GalleryItem {
11 pub thumb: String,
12 #[serde(rename = "aspectRatio")]
13 pub aspect_ratio: AspectRatio,
14 #[serde(flatten)]
15 pub extra: serde_json::Value,
16}
17
18#[derive(Debug, Deserialize, Serialize)]
19pub struct GalleryCreator {
20 pub handle: Option<String>,
21}
22
23#[derive(Debug, Deserialize, Serialize)]
24pub struct GalleryResponse {
25 pub items: Vec<GalleryItem>,
26 pub title: Option<String>,
27 pub creator: Option<GalleryCreator>,
28 #[serde(flatten)]
29 pub extra: serde_json::Value,
30}
31