0.1.4 correct url encoding of query parameters
This commit is contained in:
parent
fc3c041e0c
commit
a205f80bc5
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "up-api"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
edition = "2021"
|
||||
description = "A convenient and easy to use wrapper for the Up Bank API."
|
||||
license = "MIT OR Apache-2.0"
|
||||
@ -12,3 +12,4 @@ reqwest = "0.11.11"
|
||||
url = "2.2.2"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
urlencoding = "2.1.3"
|
||||
|
@ -116,14 +116,14 @@ impl ListAccountsOptions {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[accountType]={}", value));
|
||||
query.push_str(&format!("filter[accountType]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if let Some(value) = &self.filter_ownership_type {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[ownershipType]={}", value));
|
||||
query.push_str(&format!("filter[ownershipType]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if !query.is_empty() {
|
||||
|
@ -108,7 +108,7 @@ impl ListCategoriesOptions {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[parent]={}", value));
|
||||
query.push_str(&format!("filter[parent]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if !query.is_empty() {
|
||||
|
@ -251,35 +251,35 @@ impl ListTransactionsOptions {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[status]={}", value));
|
||||
query.push_str(&format!("filter[status]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if let Some(value) = &self.filter_since {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[since]={}", value));
|
||||
query.push_str(&format!("filter[since]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if let Some(value) = &self.filter_until {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[until]={}", value));
|
||||
query.push_str(&format!("filter[until]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if let Some(value) = &self.filter_category {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[category]={}", value));
|
||||
query.push_str(&format!("filter[category]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if let Some(value) = &self.filter_tag {
|
||||
if !query.is_empty() {
|
||||
query.push('&');
|
||||
}
|
||||
query.push_str(&format!("filter[tag]={}", value));
|
||||
query.push_str(&format!("filter[tag]={}", urlencoding::encode(value)));
|
||||
}
|
||||
|
||||
if !query.is_empty() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user