pub async fn list_tags(&self, repo_name: &str, label_id: Option<&str>, detail: Option<bool>) -> Result<Vec<Tag>> {
        let path = format!("/repositories/{}/tags", repo_name);
        let mut params = Vec::new();
        if let Some(label_id) = label_id {
            params.push(("label", label_id.to_string()));
        }
        if let Some(detail) = detail {
            params.push(("detail", detail.to_string()));
        }
        let resp = self.build_request(Method::GET, path).query(&params).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(resp.json::<Vec<Tag>>().await?)
        } else {
            Err(anyhow!("failed to list tags: {}", resp.text().await?))
        }
    }
/// Get tags of a relevant repository.
Get tags of a relevant repository.
Get tags of a relevant repository .
pub async fn list_tags(&self, repo_name: &str, label_id: Option<&str>, detail: Option<bool>) -> Result<Vec<Tag>> {
        let path = format!("/repositories/{}/tags", repo_name);
        let mut params = Vec::new();
        if let Some(label_id) = label_id {
            params.push(("label", label_id.to_string()));
        }
        if let Some(detail) = detail {
            params.push(("detail", detail.to_string()));
        }
        let resp = self.build_request(Method::GET, path).query(&params).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(resp.json::<Vec<Tag>>().await?)
        } else {
            Err(anyhow!("failed to list tags: {}", resp.text().await?))
        }
    }
pub async fn list_tags ( & self , repo_name : & str , label_id : Option < & str > , detail : Option < bool > ) -> Result < Vec < Tag > > { let path = format ! ( " " repo_name ) ; let mut params = Vec :: new ( ) ; if let Some ( label_id ) = label_id { params . push ( ( " " , label_id . to_string ( ) ) ) ; } if let Some ( detail ) = detail { params . push ( ( " " , detail . to_string ( ) ) ) ; } let resp = self . build_request ( Method :: GET , path ) . query ( & params ) . send ( ) . await ? ; if resp . status ( ) . eq ( & StatusCode :: OK ) { Ok ( resp . json :: < Vec < Tag > > ( ) . await ? ) } else { Err ( anyhow ! ( " " resp text ( ) await ) ) } }
Get tags of a relevant repository.
Get tags of a relevant repository .
&self
repo_name
&str
label_id
Option<&str>
detail
Option<bool>
&self
repo_name
&str
label_id
Option<&str>
detail
Option<bool>