pub async fn del_webhook(&self, webhook: &str) -> crate::Result<()> {
        let webhooks: Vec<String> = self.get_webhooks().await?;
        let original_len = webhooks.len();
        let new_webhooks: Vec<&str> = webhooks
            .iter()
            .filter(|&value| *value != *webhook)
            .map(|s| &**s)
            .collect();
        if original_len == new_webhooks.len() {
            Err(PlexApiError::WebhookNotFound {
                url: String::from(webhook),
            })
        } else {
            self.set_webhooks(&new_webhooks).await
        }
    }
/// Deletes provided URL from webhooks list.
Deletes provided URL from webhooks list.
Deletes provided URL from webhooks list .
pub async fn del_webhook(&self, webhook: &str) -> crate::Result<()> {
        let webhooks: Vec<String> = self.get_webhooks().await?;
        let original_len = webhooks.len();
        let new_webhooks: Vec<&str> = webhooks
            .iter()
            .filter(|&value| *value != *webhook)
            .map(|s| &**s)
            .collect();
        if original_len == new_webhooks.len() {
            Err(PlexApiError::WebhookNotFound {
                url: String::from(webhook),
            })
        } else {
            self.set_webhooks(&new_webhooks).await
        }
    }
pub async fn del_webhook ( & self , webhook : & str ) -> crate :: Result < ( ) > { let webhooks : Vec < String > = self . get_webhooks ( ) . await ? ; let original_len = webhooks . len ( ) ; let new_webhooks : Vec < & str > = webhooks . iter ( ) . filter ( | & value | * value != * webhook ) . map ( | s | & * * s ) . collect ( ) ; if original_len == new_webhooks . len ( ) { Err ( PlexApiError :: WebhookNotFound { url : String :: from ( webhook ) , } ) } else { self . set_webhooks ( & new_webhooks ) . await } }
Deletes provided URL from webhooks list.
Deletes provided URL from webhooks list .
&self
webhook
&str
&self
webhook
&str