11# PHP GitHub API
22
3- [ ![ Build Status] ( https://travis-ci.org /KnpLabs/php-github-api.svg?branch=master )] ( https://travis- ci.org/KnpLabs/php-github-api )
3+ ![ Build Status] ( https://github.com /KnpLabs/php-github-api/actions/workflows/ ci.yml/badge.svg )
44[ ![ StyleCI] ( https://styleci.io/repos/3948501/shield?style=flat )] ( https://styleci.io/repos/3948501 )
55[ ![ Latest Stable Version] ( https://poser.pugx.org/knplabs/github-api/v/stable )] ( https://packagist.org/packages/knplabs/github-api )
66[ ![ Total Downloads] ( https://poser.pugx.org/knplabs/github-api/downloads )] ( https://packagist.org/packages/knplabs/github-api )
7- [ ![ Latest Unstable Version] ( https://poser.pugx.org/knplabs/github-api/v/unstable )] ( https://packagist.org/packages/knplabs/github-api )
87[ ![ Monthly Downloads] ( https://poser.pugx.org/knplabs/github-api/d/monthly )] ( https://packagist.org/packages/knplabs/github-api )
98[ ![ Daily Downloads] ( https://poser.pugx.org/knplabs/github-api/d/daily )] ( https://packagist.org/packages/knplabs/github-api )
109
@@ -19,34 +18,46 @@ Uses [GitHub API v3](http://developer.github.com/v3/) & supports [GitHub API v4]
1918
2019## Requirements
2120
22- * PHP >= 7.1
21+ * PHP >= 7.2
2322* A [ PSR-17 implementation] ( https://packagist.org/providers/psr/http-factory-implementation )
2423* A [ PSR-18 implementation] ( https://packagist.org/providers/psr/http-client-implementation )
2524
26- ## Install
25+ ## Quick install
2726
2827Via [ Composer] ( https://getcomposer.org ) .
2928
30- ### PHP 7.1+:
29+ This command will get you up and running quickly with a guzzle http client.
3130
3231``` bash
33- composer require knplabs/github-api:^3.0 php-http/guzzle6-adapter:^2 .0.1 http-interop/http-factory-guzzle:^1.0
32+ composer require knplabs/github-api:^3.0 guzzlehttp/guzzle:^7 .0.1 http-interop/http-factory-guzzle:^1.0
3433```
3534
36- ### PHP 7.2+:
35+ ## Advanced install
36+
37+ We are decoupled from any HTTP messaging client with help by [ HTTPlug] ( https://httplug.io ) .
38+
39+ ### Using a different http client
3740
3841``` bash
39- composer require knplabs/github-api:^3.0 guzzlehttp/guzzle:^7.0.1 http-interop/http-factory-guzzle:^1.0
42+ composer require knplabs/github-api:^3.0 symfony/ http-client nyholm/psr7
4043```
4144
42- ### Laravel 6+:
45+ To set up the github client with this http client
4346
44- ``` bash
45- composer require graham-campbell/github:^10.0 guzzlehttp/guzzle:^7.0.1 http-interop/http-factory-guzzle:^1.0
47+ ``` php
48+ use Github\Client;
49+ use Symfony\Component\HttpClient\HttplugClient;
50+
51+ $client = Client::createWithHttpClient(new HttplugClient());
4652```
4753
48- We are decoupled from any HTTP messaging client with help by [ HTTPlug] ( http://httplug.io ) . Read about clients in our [ docs] ( doc/customize.md ) . [ graham-campbell/github] ( https://github.com/GrahamCampbell/Laravel-GitHub ) is by [ Graham Campbell] ( https://github.com/GrahamCampbell ) .
54+ Read more about [ using different clients in our docs] ( doc/customize.md ) .
55+
56+ ## Framework integrations
57+
58+ ### Laravel
4959
60+ To integrate this library in laravel [ Graham Campbell] ( https://github.com/GrahamCampbell ) created [ graham-campbell/github] ( https://github.com/GrahamCampbell/Laravel-GitHub ) . See the [ installation instructions] ( https://github.com/GrahamCampbell/Laravel-GitHub#installation ) to get started in laravel.
5061
5162## Basic usage of ` php-github-api ` client
5263
@@ -60,7 +71,7 @@ $client = new \Github\Client();
6071$repositories = $client->api('user')->repositories('ornicar');
6172```
6273
63- From ` $client ` object, you can access to all GitHub.
74+ From ` $client ` object, you have access to all available GitHub api endpoints .
6475
6576## Cache usage
6677
@@ -105,18 +116,18 @@ See the [`doc` directory](doc/) for more detailed documentation.
105116Please read [ this post] ( https://knplabs.com/en/blog/news-for-our-foss-projects-maintenance ) first.
106117
107118This library is maintained by the following people (alphabetically sorted) :
108- - @acrobat
109- - @Nyholm
119+ - [ @acrobat ] ( https://github.com/acrobat )
120+ - [ @Nyholm ] ( https://github.com/Nyholm )
110121
111122## Contributors
112123
113- - Thanks to [ Thibault Duplessis aka. ornicar] ( http ://github.com/ornicar) for his first version of this library.
114- - Thanks to [ Joseph Bielawski aka. stloyd] ( http ://github.com/stloyd) for his contributions and support.
115- - Thanks to [ noloh] ( http ://github.com/noloh) for his contribution on the Object API.
116- - Thanks to [ bshaffer] ( http ://github.com/bshaffer) for his contribution on the Repo API.
117- - Thanks to [ Rolf van de Krol] ( http ://github.com/rolfvandekrol) for his countless contributions.
118- - Thanks to [ Nicolas Pastorino] ( http ://github.com/jeanvoye) for his contribution on the Pull Request API.
119- - Thanks to [ Edoardo Rivello] ( http ://github.com/erivello) for his contribution on the Gists API.
124+ - Thanks to [ Thibault Duplessis aka. ornicar] ( https ://github.com/ornicar) for his first version of this library.
125+ - Thanks to [ Joseph Bielawski aka. stloyd] ( https ://github.com/stloyd) for his contributions and support.
126+ - Thanks to [ noloh] ( https ://github.com/noloh) for his contribution on the Object API.
127+ - Thanks to [ bshaffer] ( https ://github.com/bshaffer) for his contribution on the Repo API.
128+ - Thanks to [ Rolf van de Krol] ( https ://github.com/rolfvandekrol) for his countless contributions.
129+ - Thanks to [ Nicolas Pastorino] ( https ://github.com/jeanvoye) for his contribution on the Pull Request API.
130+ - Thanks to [ Edoardo Rivello] ( https ://github.com/erivello) for his contribution on the Gists API.
120131- Thanks to [ Miguel Piedrafita] ( https://github.com/m1guelpf ) for his contribution to the v4 & Apps API.
121132- Thanks to [ Emre DEGER] ( https://github.com/lexor ) for his contribution to the Actions API.
122133
0 commit comments