duncan3dc / github
A library to interact with the GitHub API
0.8.1
2023-04-30 13:55 UTC
Requires
- php: ^7.2 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.3 || ^7.0
- guzzlehttp/psr7: ^2.1.4
- lcobucci/jwt: ^3.2.2
- psr/http-message: ^1.0
- psr/simple-cache: ^1.0
Requires (Dev)
- duncan3dc/cache: ^0.6.1 || ^1.0
- duncan3dc/object-intruder: ^0.3 || ^1.0
- maglnet/composer-require-checker: ^2.0 || ^3.8
- mockery/mockery: ^1.3.5
- phpstan/phpstan: ^1.0
- phpstan/phpstan-mockery: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^8.5.29
- squizlabs/php_codesniffer: ^3.7.1
This package is auto-updated.
Last update: 2024-10-30 01:32:59 UTC
README
A PHP library to interact with the GitHub API
Full documentation is available at http://duncan3dc.github.io/github/
PHPDoc API documentation is also available at http://duncan3dc.github.io/github/api/
Installation
The recommended method of installing this library is via Composer.
Run the following command from your project root:
$ composer require duncan3dc/github
Getting Started
use duncan3dc\GitHub\Api; require __DIR__ . "/vendor/autoload.php"; # Connect to a GitHub app using the private key $api = new Api(1014, file_get_contents("/var/safe/github.pem")); # List all the organizations this app is installed under foreach ($app->getOrganizations() as $organization) { echo $organization->getName() . "\n"; } # Get a specific organization/user $organization = $app->getOrganization("duncan3dc");
Read more at http://duncan3dc.github.io/github/
Where to get help
Found a bug? Got a question? Just not sure how something works?
Please create an issue and I'll do my best to help out.
Alternatively you can catch me on Twitter