class JGithubPackageDataBlobs extends JGithubPackage

GitHub API Data Blobs class for the Joomla Platform.

Since blobs can be any arbitrary binary data, the input and responses for the blob API takes an encoding parameter that can be either utf-8 or base64. If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it.

Methods

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

Constructor.

__get( string $name)

Magic method to lazily create API objects

object
get( string $owner, string $repo, string $sha)

Get a Blob.

object
create( string $owner, string $repo, string $content, string $encoding = 'utf-8')

Create a Blob.

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

Get a Blob.

Parameters

string $owner Repository owner.
string $repo Repository name.
string $sha The commit SHA.

Return Value

object

object create( string $owner, string $repo, string $content, string $encoding = 'utf-8')

Create a Blob.

Parameters

string $owner Repository owner.
string $repo Repository name.
string $content The content of the blob.
string $encoding The encoding to use.

Return Value

object