summaryrefslogtreecommitdiffstats
path: root/src/requests/filter.rs
diff options
context:
space:
mode:
authorPaul Woolcock <paul@woolcock.us>2020-10-07 05:47:39 -0400
committerPaul Woolcock <paul@woolcock.us>2020-10-07 09:06:13 -0400
commit02ca0a89515413ac9fb3b655de2f21f6a711e0f2 (patch)
tree004bcd9f88eca168e10e1ac85c5987fdd6769fcf /src/requests/filter.rs
parent04b5b54212629f058bdab1ba55c89a3d417e0454 (diff)
Add basic async client
This adds a module, accessible by compiling with `--features async`, that provides an `elefren::async::Client`. The client is runtime-agnostic, and currently only provides unauthenticated access, see the docs for the full list of methods that can be performed* with this client. * note that some API calls are publicly available by default, but can be changed via instance settings to not be publicly accessible
Diffstat (limited to 'src/requests/filter.rs')
-rw-r--r--src/requests/filter.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/requests/filter.rs b/src/requests/filter.rs
index 7156243..448a18f 100644
--- a/src/requests/filter.rs
+++ b/src/requests/filter.rs
@@ -126,7 +126,8 @@ mod tests {
#[test]
fn test_expires_in() {
- let request = AddFilterRequest::new("foo", FilterContext::Home).expires_in(Duration::from_secs(300));
+ let request =
+ AddFilterRequest::new("foo", FilterContext::Home).expires_in(Duration::from_secs(300));
assert_eq!(
request,
AddFilterRequest {
@@ -141,7 +142,8 @@ mod tests {
#[test]
fn test_serialize_request() {
- let request = AddFilterRequest::new("foo", FilterContext::Home).expires_in(Duration::from_secs(300));
+ let request =
+ AddFilterRequest::new("foo", FilterContext::Home).expires_in(Duration::from_secs(300));
let ser = serde_json::to_string(&request).expect("Couldn't serialize");
assert_eq!(
ser,