diff options
author | fxqnlr <[email protected]> | 2022-11-20 23:54:20 +0100 |
---|---|---|
committer | fxqnlr <[email protected]> | 2022-11-20 23:54:20 +0100 |
commit | c00673fd0e01d1438798dbb1635a761a76a2b559 (patch) | |
tree | 90c1f564fd7225e7312003c82ca269677cc5778d /src/apis | |
parent | 477e0ecbb7bb34b581c518bfc2bc7ebc210b4673 (diff) | |
download | modlist-c00673fd0e01d1438798dbb1635a761a76a2b559.tar modlist-c00673fd0e01d1438798dbb1635a761a76a2b559.tar.gz modlist-c00673fd0e01d1438798dbb1635a761a76a2b559.zip |
extracted filedownload to fn;
fixed some tests;
added direct-dl to update
Diffstat (limited to 'src/apis')
-rw-r--r-- | src/apis/modrinth.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/apis/modrinth.rs b/src/apis/modrinth.rs index ec8d203..c99cfbf 100644 --- a/src/apis/modrinth.rs +++ b/src/apis/modrinth.rs | |||
@@ -4,7 +4,7 @@ use serde::Deserialize; | |||
4 | 4 | ||
5 | use crate::{Modloader, List}; | 5 | use crate::{Modloader, List}; |
6 | 6 | ||
7 | #[derive(Debug, Deserialize)] | 7 | #[derive(Debug, Deserialize, Clone)] |
8 | pub struct Project { | 8 | pub struct Project { |
9 | pub slug: String, | 9 | pub slug: String, |
10 | pub title: String, | 10 | pub title: String, |
@@ -29,21 +29,21 @@ pub struct Project { | |||
29 | pub versions: Vec<String>, | 29 | pub versions: Vec<String>, |
30 | } | 30 | } |
31 | 31 | ||
32 | #[derive(Debug, Deserialize)] | 32 | #[derive(Debug, Deserialize, Clone)] |
33 | pub struct License { | 33 | pub struct License { |
34 | pub id: String, | 34 | pub id: String, |
35 | pub name: String, | 35 | pub name: String, |
36 | pub url: Option<String>, | 36 | pub url: Option<String>, |
37 | } | 37 | } |
38 | 38 | ||
39 | #[derive(Debug, Deserialize)] | 39 | #[derive(Debug, Deserialize, Clone)] |
40 | pub struct ModeratorMessage { | 40 | pub struct ModeratorMessage { |
41 | pub message: String, | 41 | pub message: String, |
42 | pub body: Option<String>, | 42 | pub body: Option<String>, |
43 | } | 43 | } |
44 | 44 | ||
45 | #[allow(non_camel_case_types)] | 45 | #[allow(non_camel_case_types)] |
46 | #[derive(Debug, Deserialize)] | 46 | #[derive(Debug, Deserialize, Clone)] |
47 | pub enum Side { | 47 | pub enum Side { |
48 | required, | 48 | required, |
49 | optional, | 49 | optional, |
@@ -51,7 +51,7 @@ pub enum Side { | |||
51 | } | 51 | } |
52 | 52 | ||
53 | #[allow(non_camel_case_types)] | 53 | #[allow(non_camel_case_types)] |
54 | #[derive(Debug, Deserialize)] | 54 | #[derive(Debug, Deserialize, Clone)] |
55 | pub enum Type { | 55 | pub enum Type { |
56 | r#mod, | 56 | r#mod, |
57 | modpack, | 57 | modpack, |
@@ -59,7 +59,7 @@ pub enum Type { | |||
59 | } | 59 | } |
60 | 60 | ||
61 | #[allow(non_camel_case_types)] | 61 | #[allow(non_camel_case_types)] |
62 | #[derive(Debug, Deserialize)] | 62 | #[derive(Debug, Deserialize, Clone)] |
63 | pub enum Status { | 63 | pub enum Status { |
64 | approved, | 64 | approved, |
65 | rejected, | 65 | rejected, |