cleaning imports and warnings
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::services::api::{ApiBuilder, ApiError};
|
||||
use std::path::PathBuf;
|
||||
use reqwest::{Method, IntoUrl, Response, Error};
|
||||
use reqwest::{Method, Response, Error};
|
||||
use crate::utils::api::get_local_path_t;
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::{self, Write};
|
||||
@@ -28,7 +28,7 @@ impl DownloadFiles {
|
||||
self.api_builder.send().await
|
||||
}
|
||||
|
||||
pub async fn send_with_err(mut self) -> Result<Vec<u8>, ApiError> {
|
||||
pub async fn _send_with_err(mut self) -> Result<Vec<u8>, ApiError> {
|
||||
let res = self.send().await.map_err(ApiError::RequestError)?;
|
||||
if res.status().is_success() {
|
||||
let body = res.bytes().await.map_err(ApiError::EmptyError)?;
|
||||
|
||||
@@ -35,25 +35,25 @@ impl ReqProps {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn getcontenttype(&mut self) -> &mut ReqProps {
|
||||
pub fn _getcontenttype(&mut self) -> &mut ReqProps {
|
||||
self.xml_list.push(String::from("getcontenttype"));
|
||||
self.xml_payload.push_str(r#"<d:getcontenttype/>"#);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn getpermissions(&mut self) -> &mut ReqProps {
|
||||
pub fn _getpermissions(&mut self) -> &mut ReqProps {
|
||||
self.xml_list.push(String::from("permissions"));
|
||||
self.xml_payload.push_str(r#"<oc:permissions/>"#);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn getressourcetype(&mut self) -> &mut ReqProps {
|
||||
pub fn _getressourcetype(&mut self) -> &mut ReqProps {
|
||||
self.xml_list.push(String::from("resourcetype"));
|
||||
self.xml_payload.push_str(r#"<d:resourcetype/>"#);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn getetag(&mut self) -> &mut ReqProps {
|
||||
pub fn _getetag(&mut self) -> &mut ReqProps {
|
||||
self.xml_list.push(String::from("getetag"));
|
||||
self.xml_payload.push_str(r#"<d:getetag/>"#);
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user