PHP Class GitHubReposContents, github-php-client

Inheritance: extends GitHubService
ファイルを表示 Open project: tan-tan-kanarek/github-php-client

Public Methods

Method Description
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

Method Details

createFile() public method

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)
return GitHubRepoCommit

deleteFile() public method

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)
return GitHubRepoCommit

getContents() public method

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`.
return GitHubContent

getTheReadme() public method

Get the README
public getTheReadme ( $owner, $repo, $ref = null ) : GitHubReadmeContent
$ref string (Optional) - The String name of the Commit/Branch/Tag. Defaults to `master`.
return GitHubReadmeContent

updateFile() public method

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)
return GitHubRepoCommit