pub struct API { /* private fields */ }Expand description
Represents OpenList API endpoints with their respective parameters.
Implementations§
Source§impl API
impl API
Sourcepub fn fs_get(
url: impl Into<String>,
token: impl Into<String>,
path: impl Into<String>,
user_agent: impl Into<String>,
) -> Self
pub fn fs_get( url: impl Into<String>, token: impl Into<String>, path: impl Into<String>, user_agent: impl Into<String>, ) -> Self
Constructs a new OpenListAPI instance for fetching file information.
pub fn fs_link( url: impl Into<String>, token: impl Into<String>, path: impl Into<String>, user_agent: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl NetworkTarget for API
impl NetworkTarget for API
Source§fn base_url(&self) -> String
fn base_url(&self) -> String
Gets the base URL for OpenList API requests.
Ensures the URL ends with a trailing slash, if not already present.
Source§fn method(&self) -> HttpMethod
fn method(&self) -> HttpMethod
Gets the HTTP method for the request (always POST for OpenList fs/get).
Source§fn task(&self) -> NetworkTask
fn task(&self) -> NetworkTask
Converts the API operation into a network task ready for execution.
§Returns
A NetworkTask containing the JSON body with path and password.
Auto Trait Implementations§
impl Freeze for API
impl RefUnwindSafe for API
impl Send for API
impl Sync for API
impl Unpin for API
impl UnsafeUnpin for API
impl UnwindSafe for API
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more