fn api(endpoint: &str, file: &RemoteFile) -> Url {
        // Get the share URL, and add the secret fragment
        let mut url = file.url().clone();
        url.set_path(format!("/api/{}/{}", endpoint, file.id()).as_str());
        url.set_fragment(None);

        url
    }
/// Generate an API file URL, with the given endpoint.
/// The endpoint should not contain any slashes.
///
/// Valid endpoints may be 'metadata', 'download' or for example
/// 'password'.
Generate an API file URL, with the given endpoint.
The endpoint should not contain any slashes.


Generate an API file URL with the given endpoint . The endpoint should not contain any slashes .
fn api(endpoint: &str, file: &RemoteFile) -> Url {
        // Get the share URL, and add the secret fragment
        let mut url = file.url().clone();
        url.set_path(format!("/api/{}/{}", endpoint, file.id()).as_str());
        url.set_fragment(None);
        url
    }
fn api ( endpoint : & str , file : & RemoteFile ) -> Url { // Get the share URL, and add the secret fragment let mut url = file . url ( ) . clone ( ) ; url . set_path ( format ! ( " " endpoint file id ( ) ) . as_str ( ) ) ; url . set_fragment ( None ) ; url }
Generate an API file URL, with the given endpoint.
Generate an API file URL with the given endpoint .
endpoint
&str
file
&RemoteFile
endpoint
&str
file
&RemoteFile