use string for status id in StatusBuilder

master
Paul Woolcock 6 years ago
parent 8e700cf37b
commit dd72034849
  1. 9
      src/registration.rs
  2. 4
      src/status_builder.rs

@ -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()?;

@ -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>>,

Loading…
Cancel
Save