class JGithubPackageDataRefs extends JGithubPackage

GitHub API References 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
get( string $user, string $repo, string $ref)

Method to get a reference.

array
getList( string $user, string $repo, string $namespace = '', integer $page, integer $limit)

Method to list references for a repository.

object
create( string $user, string $repo, string $ref, string $sha)

Method to create a ref.

object
edit( string $user, string $repo, string $ref, string $sha, boolean $force = false)

Method to update a reference.

object
delete( string $owner, string $repo, string $ref)

Delete a Reference

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 get( string $user, string $repo, string $ref)

Method to get a reference.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $ref The reference to get.

Return Value

object

array getList( string $user, string $repo, string $namespace = '', integer $page, integer $limit)

Method to list references for a repository.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $namespace Optional sub-namespace to limit the returned references.
integer $page Page to request
integer $limit Number of results to return per page

Return Value

array

object create( string $user, string $repo, string $ref, string $sha)

Method to create a ref.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $ref The name of the fully qualified reference.
string $sha The SHA1 value to set this reference to.

Return Value

object

Exceptions

DomainException

object edit( string $user, string $repo, string $ref, string $sha, boolean $force = false)

Method to update a reference.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $ref The reference to update.
string $sha The SHA1 value to set the reference to.
boolean $force Whether the update should be forced. Default to false.

Return Value

object

Exceptions

DomainException

object delete( string $owner, string $repo, string $ref)

Delete a Reference

Parameters

string $owner The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $ref The reference to update.

Return Value

object