1 | <?php |
||
12 | class Client |
||
13 | { |
||
14 | const VERSION = '0.0.1-alpha1'; |
||
15 | const USER_AGENT = 'wyrihaximus/travis-client/' . self::VERSION; |
||
16 | const API_VERSION = 'application/vnd.travis-ci.2+json'; |
||
17 | const API_HOST_OPEN_SOURCE = 'api.travis-ci.org'; |
||
18 | const API_HOST_PRO = 'api.travis-ci.com'; |
||
19 | const API_HOST = self::API_HOST_OPEN_SOURCE; |
||
20 | const API_SCHEMA = 'https'; |
||
21 | |||
22 | /** |
||
23 | * @var callable |
||
24 | */ |
||
25 | protected $handler; |
||
26 | protected $loop; |
||
27 | |||
28 | protected $hydrators = []; |
||
29 | |||
30 | public function __construct(LoopInterface $loop, callable $handler = null) |
||
39 | |||
40 | public function request($path) |
||
51 | |||
52 | public function hydrate($class, $response) |
||
57 | |||
58 | protected function getHydrator($class) |
||
68 | |||
69 | protected function createRequest(string $method, string $path) |
||
77 | |||
78 | /** |
||
79 | * @return LoopInterface |
||
80 | */ |
||
81 | public function getLoop() |
||
85 | } |
||
86 |