summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api/src/models.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-25 19:42:39 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-25 19:42:39 -0700
commitf3523b1d900e19911bf0041ac1c75877b0bfc943 (patch)
tree4286885906e7758c4cf6625a369d17b96c4d8e62 /rust/fatcat-api/src/models.rs
parentf653c4070a076306825501ddbc27c0634d0e1438 (diff)
downloadfatcat-f3523b1d900e19911bf0041ac1c75877b0bfc943.tar.gz
fatcat-f3523b1d900e19911bf0041ac1c75877b0bfc943.zip
return all edits for an editgroup GET
Diffstat (limited to 'rust/fatcat-api/src/models.rs')
-rw-r--r--rust/fatcat-api/src/models.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs
index e3ce33c3..68242058 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api/src/models.rs
@@ -285,30 +285,32 @@ pub struct EntityEdit {
pub extra: Option<serde_json::Value>,
#[serde(rename = "editgroup_id")]
+ pub editgroup_id: i64,
+
+ #[serde(rename = "redirect_ident")]
#[serde(skip_serializing_if = "Option::is_none")]
- pub editgroup_id: Option<i64>,
+ pub redirect_ident: Option<String>,
#[serde(rename = "revision")]
#[serde(skip_serializing_if = "Option::is_none")]
pub revision: Option<i64>,
#[serde(rename = "ident")]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub ident: Option<String>,
+ pub ident: String,
#[serde(rename = "edit_id")]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub edit_id: Option<i64>,
+ pub edit_id: i64,
}
impl EntityEdit {
- pub fn new() -> EntityEdit {
+ pub fn new(editgroup_id: i64, ident: String, edit_id: i64) -> EntityEdit {
EntityEdit {
extra: None,
- editgroup_id: None,
+ editgroup_id: editgroup_id,
+ redirect_ident: None,
revision: None,
- ident: None,
- edit_id: None,
+ ident: ident,
+ edit_id: edit_id,
}
}
}