This repository has been archived by the owner on Aug 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Repository Contents
Shea Lewis edited this page Jun 2, 2015
·
2 revisions
Github::repo()->contents->show($owner, $repository, $path, $reference);
This method returns the contents of a file or directory in a repository.
-
$owner
(string) User or organization slug. Required. -
$repository
(string) Repository slug. Required. -
$path
(string) Path to the file in relation to the repository. Required. -
$reference
(string) A specific commit reference to pull the file from. Optional.
mixed
Github::repo()->contents()->download('caffeinated', 'github', 'README.md');
Github::repo()->contents()->download($owner, $repository, $path, $reference);
Downloads the given file from GitHub.
-
$owner
(string) User or organization slug. Required. -
$repository
(string) Repository slug. Required. -
$path
(string) Path to the file in relation to the repository. Required. -
$reference
(string) A specific commit reference to pull the file from. Optional.
mixed
Github::repo()->contents()->download('caffeinated', 'github', 'README.md');
Github::repo()->contents()->archive($owner, $repository, $format, $reference)
This method will return a 302
to a URL to download a tarball or zipball archive for a repository.
-
$owner
(string) User or organization slug. Required. -
$repository
(string) Repository slug. Required. -
$format
(string) Format to return archive in, can betarball
orzipball
. Optional, as it defaults totarball
. -
$reference
(string) A specific commit reference to pull the file from. Optional.
mixed
GitHub::repo()->contents()->archive('caffeinated', 'github', 'zipball', 'master');