use string for status id in StatusBuilder

This commit is contained in:
Paul Woolcock
2019-03-05 23:38:28 -05:00
parent 8e700cf37b
commit dd72034849
2 changed files with 5 additions and 8 deletions
+3 -6
View File
@@ -284,12 +284,9 @@ impl<H: HttpSend> Registered<H> {
/// provided by the authorisation url. /// provided by the authorisation url.
pub fn complete(&self, code: &str) -> Result<Mastodon<H>> { pub fn complete(&self, code: &str) -> Result<Mastodon<H>> {
let url = format!( let url = format!(
"{}/oauth/token?client_id={}&client_secret={}&code={}&grant_type=authorization_code&redirect_uri={}", "{}/oauth/token?client_id={}&client_secret={}&code={}&grant_type=authorization_code&\
self.base, redirect_uri={}",
self.client_id, self.base, self.client_id, self.client_secret, code, self.redirect
self.client_secret,
code,
self.redirect
); );
let token: AccessToken = self.send(self.client.post(&url))?.json()?; let token: AccessToken = self.send(self.client.post(&url))?.json()?;
+2 -2
View File
@@ -21,9 +21,9 @@ use std::fmt;
pub struct StatusBuilder { pub struct StatusBuilder {
/// The text of the status. /// The text of the status.
pub status: String, pub status: String,
/// Ids of accounts being replied to. /// Id of status being replied to.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub in_reply_to_id: Option<u64>, pub in_reply_to_id: Option<String>,
/// Ids of media attachments being attached to the status. /// Ids of media attachments being attached to the status.
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub media_ids: Option<Vec<String>>, pub media_ids: Option<Vec<String>>,