@@ 17-27 (lines=11) @@ | ||
14 | * @param int $appId |
|
15 | * @return array |
|
16 | */ |
|
17 | public function getSiteInfo(int $appId) : array |
|
18 | { |
|
19 | Assert::that($appId)->greaterThan(0, 'The $appId has to be positive'); |
|
20 | return (array)$this->master->doRequest( |
|
21 | 'GET', |
|
22 | sprintf( |
|
23 | '/admin/WEBAPI/Endpoints/v1_0/PluginService/{KEY}/SiteInfo/%s', |
|
24 | $appId |
|
25 | ) |
|
26 | ); |
|
27 | } |
|
28 | ||
29 | /** |
|
30 | * @see https://shoppartner.dandomain.dk/dokumentation/app-developer/ |
|
@@ 36-47 (lines=12) @@ | ||
33 | * @param array\stdClass $body |
|
34 | * @return array |
|
35 | */ |
|
36 | public function updateAppScripts(int $appId, $body) : array |
|
37 | { |
|
38 | Assert::that($appId)->greaterThan(0, 'The $appId has to be positive'); |
|
39 | return (array)$this->master->doRequest( |
|
40 | 'POST', |
|
41 | sprintf( |
|
42 | '/admin/WEBAPI/Endpoints/v1_0/PluginService/{KEY}/%s/SetAppScript', |
|
43 | $appId |
|
44 | ), |
|
45 | $body |
|
46 | ); |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @see https://shoppartner.dandomain.dk/dokumentation/app-developer/ |
|
@@ 56-67 (lines=12) @@ | ||
53 | * @param int $pageType |
|
54 | * @return boolean |
|
55 | */ |
|
56 | public function deleteAppScripts(int $appId, int $pageType) : bool |
|
57 | { |
|
58 | Assert::that($appId)->greaterThan(0, 'The $appId has to be positive'); |
|
59 | return (bool)$this->master->doRequest( |
|
60 | 'DELETE', |
|
61 | sprintf( |
|
62 | '/admin/WEBAPI/Endpoints/v1_0/PluginService/{KEY}/DeleteAppScriptForPage?appId=%s&pageType=%s', |
|
63 | $appId, |
|
64 | $pageType |
|
65 | ) |
|
66 | ); |
|
67 | } |
|
68 | } |
|
69 |