Back to the "Repos API" | Back to the navigation
You can read about references here.
$readme = $client->api('repo')->contents()->readme('KnpLabs', 'php-github-api', $reference);
$fileInfo = $client->api('repo')->contents()->show('KnpLabs', 'php-github-api', $path, $reference);
$fileExists = $client->api('repo')->contents()->exists('KnpLabs', 'php-github-api', $path, $reference);
$committer = array('name' => 'KnpLabs', 'email' => 'info@knplabs.com');
$fileInfo = $client->api('repo')->contents()->create('KnpLabs', 'php-github-api', $path, $content, $commitMessage, $branch, $committer);
$committer = array('name' => 'KnpLabs', 'email' => 'info@knplabs.com');
$oldFile = $client->api('repo')->contents()->show('KnpLabs', 'php-github-api', $path, $branch);
$fileInfo = $client->api('repo')->contents()->update('KnpLabs', 'php-github-api', $path, $content, $commitMessage, $oldFile['sha'], $branch, $committer);
$committer = array('name' => 'KnpLabs', 'email' => 'info@knplabs.com');
$oldFile = $client->api('repo')->contents()->show('KnpLabs', 'php-github-api', $path, $branch);
$fileInfo = $client->api('repo')->contents()->rm('KnpLabs', 'php-github-api', $path, $commitMessage, $oldFile['sha'], $branch, $committer);
$archive = $client->api('repo')->contents()->archive('KnpLabs', 'php-github-api', $format, $reference);
$fileContent = $client->api('repo')->contents()->download('KnpLabs', 'php-github-api', $path, $reference);