Merge pull request #2 from pwoolcoc/fix-url-error

Fix url error
master
Paul Woolcock 6 years ago committed by GitHub
commit 6c37ecb1e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/lib.rs

@ -627,11 +627,11 @@ impl Mastodon {
pub fn statuses<'a, S>(&self, id: &str, request: S) -> Result<Page<Status>>
where S: Into<Option<StatusesRequest<'a>>>
{
let url = if let Some(request) = request.into() {
request.to_querystring()
} else {
format!("{}/api/v1/accounts/{}/statuses", self.base, id)
};
let mut url = format!("{}/api/v1/accounts/{}/statuses", self.base, id);
if let Some(request) = request.into() {
url = format!("{}{}", url, request.to_querystring());
}
let response = self.client.get(&url)
.headers(self.headers.clone())

Loading…
Cancel
Save