aboutsummaryrefslogtreecommitdiffstats
path: root/rust/fatcat-api/src/models.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-19 18:31:55 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-19 18:31:55 -0700
commitd2f50808ef9b96afc36d864adec74f10c9cea9af (patch)
tree18d563e5570e9b1d578326664e7fe1cf3bc8ea9e /rust/fatcat-api/src/models.rs
parentb262ad227ba5293e210f1137e8080be0796a8c86 (diff)
downloadfatcat-d2f50808ef9b96afc36d864adec74f10c9cea9af.tar.gz
fatcat-d2f50808ef9b96afc36d864adec74f10c9cea9af.zip
implement (most) of stats endpoint
Diffstat (limited to 'rust/fatcat-api/src/models.rs')
-rw-r--r--rust/fatcat-api/src/models.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust/fatcat-api/src/models.rs b/rust/fatcat-api/src/models.rs
index 140e0c2e..15247ce6 100644
--- a/rust/fatcat-api/src/models.rs
+++ b/rust/fatcat-api/src/models.rs
@@ -618,6 +618,19 @@ impl ReleaseRef {
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct StatsResponse {
+ #[serde(rename = "extra")]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub extra: Option<serde_json::Value>,
+}
+
+impl StatsResponse {
+ pub fn new() -> StatsResponse {
+ StatsResponse { extra: None }
+ }
+}
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Success {
#[serde(rename = "message")]
pub message: String,