Add tags support

This commit is contained in:
Leon Grünewald 2024-01-01 21:50:57 +01:00
parent 46911f17ad
commit 70bdfede77

View file

@ -1,4 +1,3 @@
use std::io::Write;
use anyhow::Result; use anyhow::Result;
use base64::Engine; use base64::Engine;
use base64::engine::{GeneralPurpose}; use base64::engine::{GeneralPurpose};
@ -53,11 +52,12 @@ impl<'a> Client<'a> {
if let Some(tags) = tags { if let Some(tags) = tags {
if tags.len() > 0 { if tags.len() > 0 {
query_params.push_str("tags="); query_params.push(format!("tags={}", tags.join(",")));
query_params.push_str(tags.join(",").as_str());
} }
} }
url.set_query(Some(&query_params.join("&")));
Ok(self.http_client.get(url.as_str()) Ok(self.http_client.get(url.as_str())
.send() .send()
.await? .await?