class JGithubPackageRepositoriesHooks extends JGithubPackage

GitHub API Hooks class for the Joomla Platform.

Methods

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

__get( string $name)

Magic method to lazily create API objects

object
create( string $user, string $repo, string $name, array $config, array $events = array('push'), boolean $active = true)

Method to create a hook on a repository.

object
delete( string $user, string $repo, integer $id)

Method to delete a hook

object
edit( string $user, string $repo, integer $id, string $name, array $config, array $events = array('push'), array $addEvents = array(), array $removeEvents = array(), boolean $active = true)

Method to edit a hook.

object
get( string $user, string $repo, integer $id)

Method to get details about a single hook for the repository.

object
getList( string $user, string $repo)

Method to list hooks for a repository.

object
test( string $user, string $repo, integer $id)

Method to test a hook against the latest repository commit

Details

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

Parameters

Registry $options GitHub options object.
JGithubHttp $client The HTTP client object.

JGithubPackage __get( string $name)

Magic method to lazily create API objects

Parameters

string $name Name of property to retrieve

Return Value

JGithubPackage GitHub API package object.

Exceptions

RuntimeException

object create( string $user, string $repo, string $name, array $config, array $events = array('push'), boolean $active = true)

Method to create a hook on a repository.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $name The name of the service being called.
array $config Array containing the config for the service.
array $events The events the hook will be triggered for.
boolean $active Flag to determine if the hook is active

Return Value

object

Exceptions

DomainException
RuntimeException

object delete( string $user, string $repo, integer $id)

Method to delete a hook

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $id ID of the hook to delete.

Return Value

object

Exceptions

DomainException

object edit( string $user, string $repo, integer $id, string $name, array $config, array $events = array('push'), array $addEvents = array(), array $removeEvents = array(), boolean $active = true)

Method to edit a hook.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $id ID of the hook to edit.
string $name The name of the service being called.
array $config Array containing the config for the service.
array $events The events the hook will be triggered for. This resets the currently set list
array $addEvents Events to add to the hook.
array $removeEvents Events to remove from the hook.
boolean $active Flag to determine if the hook is active

Return Value

object

Exceptions

DomainException
RuntimeException

object get( string $user, string $repo, integer $id)

Method to get details about a single hook for the repository.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $id ID of the hook to retrieve

Return Value

object

Exceptions

DomainException

object getList( string $user, string $repo)

Method to list hooks for a repository.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.

Return Value

object

Exceptions

DomainException

object test( string $user, string $repo, integer $id)

Method to test a hook against the latest repository commit

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $id ID of the hook to delete

Return Value

object

Exceptions

DomainException