From f25574154e4ff4a19e04eb83b7b53146a6a27930 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Fri, 25 Sep 2020 17:06:19 -0400 Subject: [PATCH] Add builder method for exclude_reblogs --- src/requests/statuses.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/requests/statuses.rs b/src/requests/statuses.rs index 36130f9..a546351 100644 --- a/src/requests/statuses.rs +++ b/src/requests/statuses.rs @@ -96,6 +96,27 @@ impl<'a> StatusesRequest<'a> { self } + /// Set the `?exclude_reblogs=1` flag for the .statuses() request + /// + /// # Example + /// + /// ``` + /// # extern crate elefren; + /// # use elefren::StatusesRequest; + /// let mut request = StatusesRequest::new(); + /// assert_eq!( + /// &request + /// .exclude_reblogs() + /// .to_querystring() + /// .expect("Couldn't serialize qs"), + /// "?exclude_reblogs=1" + /// ); + /// ``` + pub fn exclude_reblogs(&mut self) -> &mut Self { + self.exclude_reblogs = true; + self + } + /// Set the `?exclude_replies=1` flag for the .statuses() request /// /// # Example