1 | <?php |
||
13 | class Client |
||
14 | { |
||
15 | const VERSION = '0.0.1-alpha1'; |
||
16 | const USER_AGENT = 'wyrihaximus/travis-client/' . self::VERSION; |
||
17 | const API_VERSION = 'application/vnd.travis-ci.2+json'; |
||
18 | const API_HOST_OPEN_SOURCE = 'api.travis-ci.org'; |
||
19 | const API_HOST_PRO = 'api.travis-ci.com'; |
||
20 | const API_HOST = self::API_HOST_OPEN_SOURCE; |
||
21 | const API_SCHEMA = 'https'; |
||
22 | |||
23 | /** |
||
24 | * @var callable |
||
25 | */ |
||
26 | protected $handler; |
||
27 | protected $loop; |
||
28 | protected $options = []; |
||
29 | protected $hydrator; |
||
30 | |||
31 | public function __construct(LoopInterface $loop, callable $handler = null, $options = []) |
||
42 | |||
43 | public function request($path) |
||
54 | |||
55 | public function getHydrator(): Hydrator |
||
59 | |||
60 | protected function createRequest(string $method, string $path) |
||
68 | |||
69 | /** |
||
70 | * @return LoopInterface |
||
71 | */ |
||
72 | public function getLoop() |
||
76 | } |
||
77 |