clone all files and their content
This commit is contained in:
2
src/services/auth.rs
Normal file
2
src/services/auth.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
19
src/services/download_files.rs
Normal file
19
src/services/download_files.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use crate::services::api::ApiBuilder;
|
||||
use reqwest::{Method, IntoUrl, Response, Error};
|
||||
|
||||
pub struct DownloadFiles {
|
||||
api_builder: ApiBuilder,
|
||||
}
|
||||
|
||||
impl DownloadFiles {
|
||||
pub fn new<U: IntoUrl>(url: U) -> Self {
|
||||
DownloadFiles {
|
||||
api_builder: ApiBuilder::new()
|
||||
.set_request(Method::GET, url),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn send(&mut self) -> Result<Response, Error> {
|
||||
self.api_builder.send().await
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user