https://github.com/jbroadway/githubfetcher
PHP 5.3+ GitHub project fetching class
https://github.com/jbroadway/githubfetcher
Last synced: 5 months ago
JSON representation
PHP 5.3+ GitHub project fetching class
- Host: GitHub
- URL: https://github.com/jbroadway/githubfetcher
- Owner: jbroadway
- Created: 2012-01-11T20:11:22.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-01-12T21:26:17.000Z (about 14 years ago)
- Last Synced: 2025-07-17T05:36:48.951Z (6 months ago)
- Language: PHP
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## GithubFetcher - PHP 5.3+ GitHub project fetching class
* Copyright: (c) 2012 Johnny Broadway
* License: http://www.opensource.org/licenses/mit-license.php
A very basic Github public project fetching tool. Uses v3 of the Github
API through CURL. Useful for quickly fetching a project from Github,
and much smaller than the full Github PHP client library.
### Usage:
```php
tree ();
$first_file = false
foreach ($tree as $item) {
printf ("%s: %s\n", $item->type, $item->path);
if (! $first_file && $item->type === 'blob') {
$first_file = $item;
}
}
// print the contents of the file
echo $github->get ($first_file);
?>
```