File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -356,4 +356,19 @@ public function getRepoTeams($username, $repo)
356356 {
357357 return $ this ->get ('repos/ ' .urlencode ($ username ).'/ ' .urlencode ($ repo ).'/teams ' );
358358 }
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+ }
359374}
You can’t perform that action at this time.
0 commit comments