1 | <?php |
||
7 | class Client |
||
8 | { |
||
9 | protected $http; |
||
10 | |||
11 | /** |
||
12 | * @var string The base URL of the JSON index containing a list of commands |
||
13 | */ |
||
14 | protected $baseUrl = "https://api.github.com/repos/tldr-pages/tldr/contents/pages/index.json?ref=master"; |
||
15 | |||
16 | protected $pageInfoUrlTemplate = "https://api.github.com/repos/tldr-pages/tldr/contents/pages/{os}/{command}.md?ref=master"; |
||
17 | |||
18 | /** |
||
19 | * Client constructor. |
||
20 | * @param \GuzzleHttp\Client $http |
||
21 | */ |
||
22 | public function __construct($http) |
||
26 | |||
27 | public function setPagesUrl(string $url) |
||
31 | |||
32 | public function getPagesUrl() |
||
36 | |||
37 | public function lookupPage(string $page) |
||
65 | } |
||
66 |