aboutsummaryrefslogtreecommitdiff
path: root/src/structures.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-04-26 15:42:39 -0700
committerFuwn <[email protected]>2021-04-26 15:42:39 -0700
commitf4c92fbf8362f789ce3c00de6cf6a64ebc2502d8 (patch)
tree78545fde636ec248aa039aa2ec1581b9b9055338 /src/structures.rs
parentfmt: Change case (diff)
downloadapi-worker-f4c92fbf8362f789ce3c00de6cf6a64ebc2502d8.tar.xz
api-worker-f4c92fbf8362f789ce3c00de6cf6a64ebc2502d8.zip
major: :star:
Diffstat (limited to 'src/structures.rs')
-rw-r--r--src/structures.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/structures.rs b/src/structures.rs
new file mode 100644
index 0000000..2a85111
--- /dev/null
+++ b/src/structures.rs
@@ -0,0 +1,28 @@
+// Copyleft 2021-2021 The Senpy Club
+// SPDX-License-Identifier: GPL-3.0-only
+
+use serde_derive::{Deserialize, Serialize};
+
+#[derive(Serialize, Deserialize, Debug)]
+pub struct GitHubAPIResponse {
+ pub sha: String,
+ pub url: String,
+ pub tree: Vec<GitHubAPIResponseTree>,
+ pub truncated: bool,
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+pub struct GitHubAPIResponseTree {
+ pub path: String,
+ pub mode: String,
+ #[serde(rename = "type")]
+ pub _type: String,
+ pub sha: String,
+ pub url: String,
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+pub struct SenpyRandom {
+ pub(crate) language: String,
+ pub image: String,
+}