1
1
# PHP GitHub API
2
2
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 )
4
4
[ ![ StyleCI] ( https://styleci.io/repos/3948501/shield?style=flat )] ( https://styleci.io/repos/3948501 )
5
5
[ ![ Latest Stable Version] ( https://poser.pugx.org/knplabs/github-api/v/stable )] ( https://packagist.org/packages/knplabs/github-api )
6
6
[ ![ 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 )
8
7
[ ![ Monthly Downloads] ( https://poser.pugx.org/knplabs/github-api/d/monthly )] ( https://packagist.org/packages/knplabs/github-api )
9
8
[ ![ Daily Downloads] ( https://poser.pugx.org/knplabs/github-api/d/daily )] ( https://packagist.org/packages/knplabs/github-api )
10
9
@@ -19,34 +18,46 @@ Uses [GitHub API v3](http://developer.github.com/v3/) & supports [GitHub API v4]
19
18
20
19
## Requirements
21
20
22
- * PHP >= 7.1
21
+ * PHP >= 7.2
23
22
* A [ PSR-17 implementation] ( https://packagist.org/providers/psr/http-factory-implementation )
24
23
* A [ PSR-18 implementation] ( https://packagist.org/providers/psr/http-client-implementation )
25
24
26
- ## Install
25
+ ## Quick install
27
26
28
27
Via [ Composer] ( https://getcomposer.org ) .
29
28
30
- ### PHP 7.1+:
29
+ This command will get you up and running quickly with a guzzle http client.
31
30
32
31
``` 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
34
33
```
35
34
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
37
40
38
41
``` 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
40
43
```
41
44
42
- ### Laravel 6+:
45
+ To set up the github client with this http client
43
46
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());
46
52
```
47
53
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
49
59
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.
50
61
51
62
## Basic usage of ` php-github-api ` client
52
63
@@ -60,7 +71,7 @@ $client = new \Github\Client();
60
71
$repositories = $client->api('user')->repositories('ornicar');
61
72
```
62
73
63
- From ` $client ` object, you can access to all GitHub.
74
+ From ` $client ` object, you have access to all available GitHub api endpoints .
64
75
65
76
## Cache usage
66
77
@@ -105,18 +116,18 @@ See the [`doc` directory](doc/) for more detailed documentation.
105
116
Please read [ this post] ( https://knplabs.com/en/blog/news-for-our-foss-projects-maintenance ) first.
106
117
107
118
This 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 )
110
121
111
122
## Contributors
112
123
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.
120
131
- Thanks to [ Miguel Piedrafita] ( https://github.com/m1guelpf ) for his contribution to the v4 & Apps API.
121
132
- Thanks to [ Emre DEGER] ( https://github.com/lexor ) for his contribution to the Actions API.
122
133
0 commit comments