Back to the "Repos API" | Back to the navigation
$readme = $client->api('repo')->contents()->readme('knp-labs', 'php-github-api', $reference);
$fileInfo = $client->api('repo')->contents()->show('knp-labs', 'php-github-api', $path, $reference);
$fileExists = $client->api('repo')->contents()->exists('knp-labs', 'php-github-api', $path, $reference);
$committer = array('name' => 'KnpLabs', 'email' => '[email protected]');
$fileInfo = $client->api('repo')->contents()->create('knp-labs', 'php-github-api', $path, $content, $commitMessage, $branch, $committer);
$committer = array('name' => 'KnpLabs', 'email' => '[email protected]');
$oldFile = $client->api('repo')->contents()->show('knp-labs', 'php-github-api', $path, $branch);
$fileInfo = $client->api('repo')->contents()->update('knp-labs', 'php-github-api', $path, $content, $commitMessage, $oldFile['sha'], $branch, $committer);
$committer = array('name' => 'KnpLabs', 'email' => '[email protected]');
$oldFile = $client->api('repo')->contents()->show('knp-labs', 'php-github-api', $path, $branch);
$fileInfo = $client->api('repo')->contents()->rm('knp-labs', 'php-github-api', $path, $commitMessage, $oldFile['sha'], $branch, $committer);
$archive = $client->api('repo')->contents()->archive('knp-labs', 'php-github-api', $format, $reference);
$fileContent = $client->api('repo')->contents()->download('knp-labs', 'php-github-api', $path, $reference);