1 | <?php declare(strict_types = 1); |
||
19 | class GitAmp |
||
20 | { |
||
21 | const API_ENDPOINT = 'https://api.github.com/events'; |
||
22 | |||
23 | /** |
||
24 | * @var Client |
||
25 | */ |
||
26 | private $client; |
||
27 | private $credentials; |
||
28 | private $eventFactory; |
||
29 | |||
30 | /** |
||
31 | * GitAmp constructor. |
||
32 | * @param Client $client |
||
33 | */ |
||
34 | 2 | public function __construct(Client $client, Credentials $credentials, Factory $eventFactory) |
|
40 | |||
41 | /** |
||
42 | * @return Promise |
||
43 | * @throws RequestFailedException |
||
44 | */ |
||
45 | 2 | public function request(): Promise |
|
59 | |||
60 | public function listen(): Promise |
||
72 | |||
73 | 2 | private function getAuthHeader(): array |
|
77 | } |
||
78 |