File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1010- [ ] - Implement custom struct for ` requested_status ` value (w/ Option)
1111- [ ] - implement custom deserializer for URL links
1212- [ ] - implement custom struct for donation links
13- - [ ] - implement custom struct for license
13+ - [x ] - implement custom struct for license
1414- [x] - implement custom ` ProjectStatus ` struct
Original file line number Diff line number Diff line change 22//!
33//! [documentation](https://docs.modrinth.com/api/operations/tags/projects/)
44
5- use super :: Date ;
5+ use super :: * ;
66use serde:: { Deserialize , Serialize } ;
77
88#[ derive( Debug , Serialize , Deserialize ) ]
@@ -70,9 +70,7 @@ pub struct Project {
7070 pub approved : Option < Date > ,
7171 pub queued : Option < Date > ,
7272 pub followers : usize ,
73- /// TODO: read #6 in TODO.md file (structs\projects section)
74- #[ serde( skip) ]
75- pub license : Option < Vec < String > > , // placeholder
73+ pub license : License ,
7674 /// A list of the version IDs of the project (will never be empty unless draft status)
7775 pub versions : Vec < String > ,
7876 /// A list of all the game versions supported by the project
@@ -101,3 +99,10 @@ pub enum MonetizationStatus {
10199 Demonetized ,
102100 ForceDemonetized ,
103101}
102+
103+ #[ derive( Deserialize , Serialize , Debug , Clone ) ]
104+ pub struct License {
105+ pub id : String ,
106+ pub name : String ,
107+ pub url : Option < String > ,
108+ }
You can’t perform that action at this time.
0 commit comments