Skip to main content

WebhooksApi

Trait WebhooksApi 

Source
pub trait WebhooksApi {
    // Required methods
    fn create_webhook(
        &self,
        repository: &RepoRef,
        webhook: &WebhookBody,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn delete_webhook(
        &self,
        repository: &RepoRef,
        id: u64,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn update_webhook(
        &self,
        repository: &RepoRef,
        id: u64,
        webhook: &WebhookPatch,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn webhooks(
        &self,
        repository: &RepoRef,
    ) -> impl Future<Output = Result<Vec<Webhook>, ForgeError>> + Send;
}
Expand description

The webhooks operations of the GitHub API.

Required Methods§

Source

fn create_webhook( &self, repository: &RepoRef, webhook: &WebhookBody, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Create a webhook.

Source

fn delete_webhook( &self, repository: &RepoRef, id: u64, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Delete the webhook id.

Source

fn update_webhook( &self, repository: &RepoRef, id: u64, webhook: &WebhookPatch, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Update the webhook id.

Source

fn webhooks( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Webhook>, ForgeError>> + Send

Read the repository’s webhooks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§