PHP Класс GitHubReposContents, github-php-client

Наследование: extends GitHubService
Показать файл Открыть проект

Открытые методы

Метод Описание
createFile ( $owner, $repo, $path, $msg, $content, $branch = 'master' ) : GitHubRepoCommit Create a file
deleteFile ( $owner, $repo, $path, $msg, $content, $sha, $branch = 'master' ) : GitHubRepoCommit Delete a file
getContents ( $owner, $repo, $path, $ref = null ) : GitHubContent Get the content
getTheReadme ( $owner, $repo, $ref = null ) : GitHubReadmeContent Get the README
updateFile ( $owner, $repo, $path, $msg, $content, $sha, $branch = 'master' ) : GitHubRepoCommit Update a file

Описание методов

createFile() публичный Метод

Create a file
public createFile ( $owner, $repo, $path, $msg, $content, $branch = 'master' ) : GitHubRepoCommit
$path string Required. The content path.
$content string Required. The new file content, Base64 encoded.
$branch string The branch name. Default: the repository’s default branch (usually master)
Результат GitHubRepoCommit

deleteFile() публичный Метод

Delete a file
public deleteFile ( $owner, $repo, $path, $msg, $content, $sha, $branch = 'master' ) : GitHubRepoCommit
$path string Required. The content path.
$sha string Required. The blob SHA of the file being replaced.
$branch string The branch name. Default: the repository’s default branch (usually master)
Результат GitHubRepoCommit

getContents() публичный Метод

Get the content
public getContents ( $owner, $repo, $path, $ref = null ) : GitHubContent
$ref string (Optional) - The String name of the Commit/Branch/Tag. Defaults to `master`.
Результат GitHubContent

getTheReadme() публичный Метод

Get the README
public getTheReadme ( $owner, $repo, $ref = null ) : GitHubReadmeContent
$ref string (Optional) - The String name of the Commit/Branch/Tag. Defaults to `master`.
Результат GitHubReadmeContent

updateFile() публичный Метод

Update a file
public updateFile ( $owner, $repo, $path, $msg, $content, $sha, $branch = 'master' ) : GitHubRepoCommit
$path string Required. The content path.
$content string Required. The updated file content, Base64 encoded.
$sha string Required. The blob SHA of the file being replaced.
$branch string The branch name. Default: the repository’s default branch (usually master)
Результат GitHubRepoCommit