class WebhooksClient

Traits

Properties

protected $curl from CICommon
protected $api_url from CICommon

Methods

__construct(Curl $curl, string $api_url)

CICommon constructor.

from CICommon
mixed
list(string $org_name)

List hooks.

mixed
get(string $org_name, int $hook_id)

Get single hook.

void
create(string $org_name, string $hook_name, array $events, string $url, string $secret, string $content_type = 'json', string $insecure_ssl = '0', bool $active = true)

Create a hook.

void
edit(string $org_name, int $hook_id, array $events, string $url, string $secret, string $content_type = 'json', string $insecure_ssl = '0', bool $active = true)

Edit a hook.

void
ping(string $org_name, int $hook_id)

Ping a hook.

void
delete(string $org_name, string $hook_id)

Delete a hook.

Details

in CICommon at line 18
__construct(Curl $curl, string $api_url)

CICommon constructor.

Parameters

Curl $curl
string $api_url

at line 20
mixed list(string $org_name)

List hooks.

Parameters

string $org_name

Return Value

mixed

Exceptions

Exception

at line 32
mixed get(string $org_name, int $hook_id)

Get single hook.

Parameters

string $org_name
int $hook_id

Return Value

mixed

Exceptions

Exception

at line 46
void create(string $org_name, string $hook_name, array $events, string $url, string $secret, string $content_type = 'json', string $insecure_ssl = '0', bool $active = true)

Create a hook.

201

Parameters

string $org_name
string $hook_name
array $events
string $url
string $secret
string $content_type
string $insecure_ssl
bool $active

Return Value

void

Exceptions

Exception

at line 75
void edit(string $org_name, int $hook_id, array $events, string $url, string $secret, string $content_type = 'json', string $insecure_ssl = '0', bool $active = true)

Edit a hook.

Parameters

string $org_name
int $hook_id
array $events
string $url
string $secret
string $content_type
string $insecure_ssl
bool $active

Return Value

void

Exceptions

Exception

at line 105
void ping(string $org_name, int $hook_id)

Ping a hook.

204

Parameters

string $org_name
int $hook_id

Return Value

void

Exceptions

Exception

at line 115
void delete(string $org_name, string $hook_id)

Delete a hook.

Parameters

string $org_name
string $hook_id

Return Value

void

Exceptions

Exception