package github
-
github
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
The Hook
module provides access to GitHub's webhooks API which lets you manage a repository's post-receive hooks.
val for_repo :
?token:Token.t ->
user:string ->
repo:string ->
unit ->
Github_t.hook Stream.t
for_repo ~user ~repo ()
is a stream of hooks for repo user
/repo
.
val get :
?token:Token.t ->
user:string ->
repo:string ->
id:int64 ->
unit ->
Github_t.hook Response.t Monad.t
get ~user ~repo ~id ()
is hook id
for repo user
/repo
.
val create :
?token:Token.t ->
user:string ->
repo:string ->
hook:Github_t.new_hook ->
unit ->
Github_t.hook Response.t Monad.t
create ~user ~repo ~hook ()
is a newly created post-receive hook for repo user
/repo
as described by hook
.
val update :
?token:Token.t ->
user:string ->
repo:string ->
id:int64 ->
hook:Github_t.update_hook ->
unit ->
Github_t.hook Response.t Monad.t
update ~user ~repo ~id ~hook ()
is the updated hook id
in repo user
/repo
as described by hook
.
val delete :
?token:Token.t ->
user:string ->
repo:string ->
id:int64 ->
unit ->
unit Response.t Monad.t
delete ~user ~repo ~id ()
activates after hook id
in repo user
/repo
has been deleted.
val test :
?token:Token.t ->
user:string ->
repo:string ->
id:int64 ->
unit ->
unit Response.t Monad.t
test ~user ~repo ~id ()
activates after a push
event for the lastest push to user
/repo
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
.