JGithubAccount

Extends \JGithubObject

GitHub API Account class for the Joomla Platform.

deprecated
since

3.1.4

deprecated

4.0 Use the joomla/github package via Composer instead

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JGithubHttp $client = null) 
inherited
since

1.7.3

Arguments

$options

\Joomla\Registry\RegistryGitHub options object.

$client

\JGithubHttpThe HTTP client object.

createAuthorisation

Method to create an authorisation.

createAuthorisation(array $scopes = array(), string $note = '', string $url = '') : object
deprecated
deprecated

use authorization->create()

since

3.1.4

throws

\DomainException

Arguments

$scopes

arrayA list of scopes that this authorisation is in.

$note

stringA note to remind you what the OAuth token is for.

$url

stringA URL to remind you what app the OAuth token is for.

Response

object

deleteAuthorisation

Method to delete an authorisation

deleteAuthorisation(integer $id) : object
deprecated
deprecated

use authorization->delete()

since

3.1.4

throws

\DomainException

Arguments

$id

integerID of the authorisation to delete

Response

object

editAuthorisation

Method to edit an authorisation.

editAuthorisation(integer $id, array $scopes = array(), array $addScopes = array(), array $removeScopes = array(), string $note = '', string $url = '') : object
deprecated
deprecated

use authorization->edit()

since

3.1.4

throws

\DomainException

\RuntimeException

Arguments

$id

integerID of the authorisation to edit

$scopes

arrayReplaces the authorisation scopes with these.

$addScopes

arrayA list of scopes to add to this authorisation.

$removeScopes

arrayA list of scopes to remove from this authorisation.

$note

stringA note to remind you what the OAuth token is for.

$url

stringA URL to remind you what app the OAuth token is for.

Response

object

fetchUrl

Method to build and return a full request URL for the request. This method will add appropriate pagination details if necessary and also prepend the API url to have a complete URL for the request.

fetchUrl(string $path, integer $page, integer $limit) : string
inherited
since

1.7.3

Arguments

$path

stringURL to inflect

$page

integerPage to request

$limit

integerNumber of results to return per page

Response

stringThe request URL.

getAuthorisation

Method to get details about an authorised application for the authenticated user.

getAuthorisation(integer $id) : object
deprecated
deprecated

use authorization->get()

since

3.1.4

note

This method will only accept Basic Authentication

throws

\DomainException

Arguments

$id

integerID of the authorisation to retrieve

Response

object

getAuthorisations

Method to get the authorised applications for the authenticated user.

getAuthorisations() : object
deprecated
deprecated

use authorization->getList()

since

3.1.4

throws

\DomainException

note

This method will only accept Basic Authentication

Response

object

getRateLimit

Method to get the rate limit for the authenticated user.

getRateLimit() : object
deprecated
deprecated

use authorization->getRateLimit()

since

3.1.4

throws

\DomainException

Response

object

processResponse

Process the response and decode it.

processResponse(\JHttpResponse $response, integer $expectedCode = 200, boolean $decode = true) : mixed
inherited
throws

\DomainException

since

3.3.0

Arguments

$response

\JHttpResponseThe response.

$expectedCode

integerThe expected "good" code.

$decode

booleanIf the should be response be JSON decoded.

Response

mixed

Properties

options

Options for the GitHub object.

inherited
since

1.7.3

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.7.3

Type(s)

\JGithubHttp