class JGithubPackageRepositoriesCollaborators extends JGithubPackage

GitHub API Repositories Collaborators 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
getList( string $owner, string $repo)

List.

boolean
get( string $owner, string $repo, string $user)

Test if a user is a collaborator.

object
add( string $owner, string $repo, string $user)

Add collaborator.

object
remove( string $owner, string $repo, string $user)

Remove collaborator.

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 getList( string $owner, string $repo)

List.

When authenticating as an organization owner of an organization-owned repository, all organization owners are included in the list of collaborators. Otherwise, only users with access to the repository are returned in the collaborators list.

Parameters

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

Return Value

object

boolean get( string $owner, string $repo, string $user)

Test if a user is a collaborator.

Parameters

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

Return Value

boolean

Exceptions

UnexpectedValueException

object add( string $owner, string $repo, string $user)

Add collaborator.

Parameters

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

Return Value

object

object remove( string $owner, string $repo, string $user)

Remove collaborator.

Parameters

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

Return Value

object