Skip to main content

WebhooksApi

Trait WebhooksApi 

Source
pub trait WebhooksApi {
    // Required methods
    fn create_webhook(
        &self,
        repo: &RepoRef,
        body: &CreateHookOption,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn delete_webhook(
        &self,
        repo: &RepoRef,
        id: i64,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn patch_webhook(
        &self,
        repo: &RepoRef,
        id: i64,
        body: &EditHookOption,
    ) -> impl Future<Output = Result<(), ForgeError>> + Send;
    fn webhooks(
        &self,
        repo: &RepoRef,
    ) -> impl Future<Output = Result<Vec<Hook>, ForgeError>> + Send;
}
Expand description

The webhook operations of the Forgejo API.

Required Methods§

Source

fn create_webhook( &self, repo: &RepoRef, body: &CreateHookOption, ) -> impl Future<Output = Result<(), ForgeError>> + Send

POST /repos/{owner}/{repo}/hooks.

Source

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

DELETE /repos/{owner}/{repo}/hooks/{id}.

Source

fn patch_webhook( &self, repo: &RepoRef, id: i64, body: &EditHookOption, ) -> impl Future<Output = Result<(), ForgeError>> + Send

PATCH /repos/{owner}/{repo}/hooks/{id}.

Source

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

GET /repos/{owner}/{repo}/hooks, every page.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§