class ContentsClient

Traits

Properties

protected $curl from CICommon
protected $api_url from CICommon

Methods

__construct(Curl $curl, string $api_url)

CICommon constructor.

from CICommon
mixed
getReadme(string $repo_full_name, string $ref)

Get the README.

$this
getContents(string $repo_full_name, string $path, string $ref)

Get contents.

mixed
createFile(string $repo_full_name, string $path, string $commit_message, string $content, string|null $branch, string|null $committer_name, string|null $committer_email)

Create a file.

mixed
updateFile(string $repo_full_name, string $path, string $commit_message, string $content, string $sha, string|null $branch, string|null $committer_name, string|null $committer_email)

Update a file.

mixed
deleteFile(string $repo_full_name, string $path, string $commit_message, string $sha, string|null $branch, string $committer_name, string $committer_email)

Delete a file.

mixed
getArchiveLink(string $repo_full_name, string $ref, string $archive_format = 'tarball')

Get archive link.

Details

in CICommon at line 18
__construct(Curl $curl, string $api_url)

CICommon constructor.

Parameters

Curl $curl
string $api_url

at line 22
mixed getReadme(string $repo_full_name, string $ref)

Get the README.

Parameters

string $repo_full_name
string $ref

Return Value

mixed

Exceptions

Exception

at line 34
$this getContents(string $repo_full_name, string $path, string $ref)

Get contents.

Parameters

string $repo_full_name
string $path
string $ref

Return Value

$this

Exceptions

Exception

at line 50
mixed createFile(string $repo_full_name, string $path, string $commit_message, string $content, string|null $branch, string|null $committer_name, string|null $committer_email)

Create a file.

Parameters

string $repo_full_name
string $path
string $commit_message
string $content
string|null $branch
string|null $committer_name
string|null $committer_email

Return Value

mixed

Exceptions

Exception

at line 89
mixed updateFile(string $repo_full_name, string $path, string $commit_message, string $content, string $sha, string|null $branch, string|null $committer_name, string|null $committer_email)

Update a file.

Parameters

string $repo_full_name
string $path
string $commit_message
string $content
string $sha
string|null $branch
string|null $committer_name
string|null $committer_email

Return Value

mixed

Exceptions

Exception

at line 128
mixed deleteFile(string $repo_full_name, string $path, string $commit_message, string $sha, string|null $branch, string $committer_name, string $committer_email)

Delete a file.

Parameters

string $repo_full_name
string $path
string $commit_message
string $sha
string|null $branch
string $committer_name
string $committer_email

Return Value

mixed

Exceptions

Exception

Get archive link.

Parameters

string $repo_full_name
string $ref
string $archive_format

Return Value

mixed

Exceptions

Exception