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 f72a4a2 + 1639bee commit 725bf7cCopy full SHA for 725bf7c
lib/Github/Api/Repo.php
@@ -356,4 +356,19 @@ public function getRepoTeams($username, $repo)
356
{
357
return $this->get('repos/'.urlencode($username).'/'.urlencode($repo).'/teams');
358
}
359
+
360
+ /**
361
+ * Get contents of any file or directory in a repository
362
+ * @link http://developer.github.com/v3/repos/contents/
363
+ *
364
+ * @param string $username the user who owns the repo
365
+ * @param string $repo the name of the repo
366
+ * @param $path path to file or directory
367
368
+ * @return array information for file | information for each item in directory
369
+ */
370
+ public function getRepoContents($username, $repo, $path)
371
+ {
372
+ return $this->get('repos/'.urlencode($username).'/'.urlencode($repo).'/contents/'.$path);
373
+ }
374
0 commit comments