From 0b5441e52c655aa5ce409a31697b22a9939914e3 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 10 Feb 2018 19:21:58 +0100 Subject: [PATCH] Changes IDs to Strings for compliance with APIv1 (#20) --- src/entities/account.rs | 2 +- src/entities/notification.rs | 2 +- src/entities/report.rs | 2 +- src/entities/status.rs | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/entities/account.rs b/src/entities/account.rs index bcb7ca8..fd2117f 100644 --- a/src/entities/account.rs +++ b/src/entities/account.rs @@ -24,7 +24,7 @@ pub struct Account { /// URL to the header static image (gif). pub header_static: String, /// The ID of the account. - pub id: u64, + pub id: String, /// Boolean for when the account cannot be followed without waiting for /// approval first. pub locked: bool, diff --git a/src/entities/notification.rs b/src/entities/notification.rs index f3fd08e..41074e3 100644 --- a/src/entities/notification.rs +++ b/src/entities/notification.rs @@ -8,7 +8,7 @@ use super::status::Status; #[derive(Debug, Clone, Deserialize)] pub struct Notification { /// The notification ID. - pub id: u64, + pub id: String, /// The type of notification. #[serde(rename = "type")] pub notification_type: NotificationType, diff --git a/src/entities/report.rs b/src/entities/report.rs index bba0e11..b3bcdfd 100644 --- a/src/entities/report.rs +++ b/src/entities/report.rs @@ -4,7 +4,7 @@ #[derive(Debug, Clone, Deserialize)] pub struct Report { /// The ID of the report. - pub id: u64, + pub id: String, /// The action taken in response to the report. pub action_taken: String, } diff --git a/src/entities/status.rs b/src/entities/status.rs index 94f2a4b..e78d7c7 100644 --- a/src/entities/status.rs +++ b/src/entities/status.rs @@ -8,7 +8,7 @@ use status_builder::Visibility; #[derive(Debug, Clone, Deserialize)] pub struct Status { /// The ID of the status. - pub id: i64, + pub id: String, /// A Fediverse-unique resource ID. pub uri: String, /// URL to the status page (can be remote) @@ -17,10 +17,10 @@ pub struct Status { pub account: Account, /// The ID of the status this status is replying to, if the status is /// a reply. - pub in_reply_to_id: Option, + pub in_reply_to_id: Option, /// The ID of the account this status is replying to, if the status is /// a reply. - pub in_reply_to_account_id: Option, + pub in_reply_to_account_id: Option, /// If this status is a reblogged Status of another User. pub reblog: Option>, /// Body of the status; this will contain HTML @@ -63,7 +63,7 @@ pub struct Mention { /// Equals `username` for local users, includes `@domain` for remote ones. pub acct: String, /// Account ID. - pub id: u64, + pub id: String, } /// Hashtags in the status.