We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 32e7fb7 + f17a3e7 commit a843793Copy full SHA for a843793
lib/Github/Api/Repo.php
@@ -237,12 +237,15 @@ public function remove($username, $repository)
237
*
238
* @param string $username the user who owns the repository
239
* @param string $repository the name of the repository
240
+ * @param string $format one of formats: "raw" or "html"
241
242
* @return array the readme content
243
*/
- public function readme($username, $repository)
244
+ public function readme($username, $repository, $format = 'raw')
245
{
- return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme');
246
+ return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme', [], [
247
+ 'Accept' => "application/vnd.github.$format",
248
+ ]);
249
}
250
251
/**
0 commit comments