Total Complexity | 7 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Folder extends Autentique |
||
6 | { |
||
7 | public function __construct() |
||
8 | { |
||
9 | parent::__construct(); |
||
10 | } |
||
11 | |||
12 | /** |
||
13 | * @param string $name |
||
14 | * @return $this |
||
15 | */ |
||
16 | public function createFolder(string $name): Autentique |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * @param string $folderId |
||
27 | * @return object |
||
28 | */ |
||
29 | public function folder(string $folderId): object |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param int|null $limit |
||
38 | * @return object |
||
39 | */ |
||
40 | public function folders(?int $limit = null): object |
||
41 | { |
||
42 | $limit = empty($limit) ? 60 : $limit; |
||
43 | $this->data->query = "query { folders(limit: {$limit}, page: 1) { total data { id name type created_at } } }"; |
||
44 | $this->execute(); |
||
45 | return $this->callback(); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param string $folderId |
||
50 | * @return $this |
||
51 | */ |
||
52 | public function deleteFolder(string $folderId): Autentique |
||
53 | { |
||
54 | $this->data->query = "mutation { deleteFolder(id: \"{$folderId}\") }"; |
||
55 | $this->execute(); |
||
56 | return $this; |
||
57 | } |
||
58 | |||
59 | public function documentsByFolder(string $folderId): object |
||
64 | } |
||
65 | } |