Class JGithubHooks

Description

GitHub API Hooks class for the Joomla Platform.

  • since: 12.3

Located in /libraries/joomla/github/hooks.php (line 19)

JGithubObject
   |
   --JGithubHooks
Variable Summary
 array $events
Method Summary
 object create (string $user, string $repo, string $name, array $config, [array $events = array('push')], [boolean $active = true])
 object delete (string $user, string $repo, integer $id)
 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])
 object get (string $user, string $repo, integer $id)
 object getList (string $user, string $repo, [integer $page = 0], [integer $limit = 0])
 object test (string $user, string $repo, integer $id)
Variables
array $events = array(
'push', 'issues', 'issue_comment', 'commit_comment', 'pull_request', 'gollum', 'watch', 'download', 'fork', 'fork_apply',
'member', 'public', 'status'
)
(line 27)

Array containing the allowed hook events

  • since: 12.3
  • access: protected

Inherited Variables

Inherited from JGithubObject

JGithubObject::$client
JGithubObject::$options
Methods
create (line 48)

Method to create a hook on a repository.

  • throws: DomainException
  • throws: RuntimeException
  • since: 12.3
  • access: public
object create (string $user, string $repo, string $name, array $config, [array $events = array('push')], [boolean $active = true])
  • 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
delete (line 84)

Method to delete a hook

  • since: 12.3
  • throws: DomainException
  • access: public
object delete (string $user, string $repo, integer $id)
  • 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.
edit (line 114)

Method to edit a hook.

  • throws: DomainException
  • throws: RuntimeException
  • since: 12.3
  • access: public
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])
  • 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
get (line 171)

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

  • since: 12.3
  • throws: DomainException
  • access: public
object get (string $user, string $repo, integer $id)
  • 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
getList (line 194)

Method to list hooks for a repository.

  • since: 12.3
  • throws: DomainException
  • access: public
object getList (string $user, string $repo, [integer $page = 0], [integer $limit = 0])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $page: Page to request
  • integer $limit: Number of results to return per page
test (line 216)

Method to test a hook against the latest repository commit

  • since: 12.3
  • throws: DomainException
  • access: public
object test (string $user, string $repo, integer $id)
  • 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

Inherited Methods

Inherited From JGithubObject

 JGithubObject::__construct()
 JGithubObject::fetchUrl()
 JGithubObject::processResponse()

Documentation generated on Tue, 19 Nov 2013 15:04:44 +0100 by phpDocumentor 1.4.3