Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 91.67% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Tilesets extends MapboxRequest |
||
10 | { |
||
11 | /** |
||
12 | * Create a new Tileset request instance. |
||
13 | * |
||
14 | * @param string|null $tileset_id |
||
15 | */ |
||
16 | 14 | public function __construct(string $tileset = null) |
|
17 | { |
||
18 | 14 | $this->tileset = $tileset; |
|
19 | 14 | } |
|
20 | |||
21 | /** |
||
22 | * List Tilesets. |
||
23 | * |
||
24 | * @see https://docs.mapbox.com/api/maps/#list-tilesets |
||
25 | * @return array |
||
26 | */ |
||
27 | 14 | public function list() |
|
28 | { |
||
29 | 14 | return Zttp::get($this->url(Mapbox::TILESETS_ENDPOINT))->json(); |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * Delete a Tileset. |
||
34 | * |
||
35 | * @see https://docs.mapbox.com/api/maps/#delete-tileset |
||
36 | * @return bool |
||
37 | */ |
||
38 | 8 | public function delete() |
|
49 | } |
||
50 | } |
||
51 |