package github-unix

  1. Overview
  2. Docs

The Hook module provides access to GitHub's organization webhooks API which lets you manage an organization's remote notification hooks.

val for_org : ?token:Token.t -> org:string -> unit -> Github_t.hook Stream.t

for_org ~org () is a stream of hooks for the organization org.

val get : ?token:Token.t -> org:string -> id:int64 -> unit -> Github_t.hook Response.t Monad.t

get ~org ~id () is hook id for organization org.

val create : ?token:Token.t -> org:string -> hook:Github_t.new_hook -> unit -> Github_t.hook Response.t Monad.t

create ~org ~hook () is a newly created post-receive hook for organization org as described by hook.

val update : ?token:Token.t -> org:string -> id:int64 -> hook:Github_t.update_hook -> unit -> Github_t.hook Response.t Monad.t

update ~org ~id ~hook () is the updated hook id for organization org as described by hook.

val delete : ?token:Token.t -> org:string -> id:int64 -> unit -> unit Response.t Monad.t

delete ~org ~id () activates after hook id in organization org has been deleted.

val test : ?token:Token.t -> org:string -> id:int64 -> unit -> unit Response.t Monad.t

test ~org ~id () activates after a push event for the lastest push for organization org has been synthesized and sent to hook id.

val parse_event : constr:string -> payload:string -> unit -> Github_t.event_hook_constr

parse_event ~constr ~payload () is the event with constructor constr that is represented by payload.

val parse_event_metadata : payload:string -> unit -> Github_t.event_hook_metadata

parse_event_metadata ~payload () is the event metadata for the serialized event payload.

OCaml

Innovation. Community. Security.