1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::http::Escape;
use reqwest::{Client, RequestBuilder};
#[derive(Clone, PartialEq, serde::Deserialize, serde::Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct GetNotificationRequest {
pub bucket: String,
pub notification: String,
}
pub(crate) fn build(base_url: &str, client: &Client, req: &GetNotificationRequest) -> RequestBuilder {
let url = format!(
"{}/b/{}/notificationConfigs/{}",
base_url,
req.bucket.escape(),
req.notification.escape()
);
client.get(url)
}