github_ureq/types/
release.rs

1use chrono::{DateTime, Local};
2use serde::{Deserialize, Serialize};
3
4use crate::User;
5
6#[derive(Clone, Debug, Serialize, Deserialize)]
7pub struct Release {
8    pub url: String,
9    pub assets_url: String,
10    pub upload_url: String,
11    pub html_url: String,
12    pub id: usize,
13    pub author: User,
14    pub node_id: String,
15    pub tag_name: String,
16    pub target_commitish: String,
17    pub name: Option<String>,
18    pub draft: bool,
19    pub prerelease: bool,
20    pub created_at: DateTime<Local>,
21    pub published_at: DateTime<Local>,
22    pub assets: Vec<ReleaseAsset>,
23    pub tarball_url: String,
24    pub zipball_url: String,
25    pub body: Option<String>,
26}
27
28#[derive(Clone, Debug, Serialize, Deserialize)]
29pub struct ReleaseAsset {
30    pub url: String,
31    pub id: usize,
32    pub node_id: String,
33    pub name: String,
34    pub label: Option<String>,
35    pub uploader: User,
36    pub content_type: String,
37    pub state: String,
38    pub size: usize,
39    pub download_count: usize,
40    pub created_at: DateTime<Local>,
41    pub updated_at: DateTime<Local>,
42    pub browser_download_url: String,
43}