1 | <?php |
||
2 | |||
3 | //---------------------------------------------------------------------- |
||
4 | // |
||
5 | // Copyright (C) 2015-2017 Artem Rodygin |
||
6 | // |
||
7 | // This file is part of Linode API Client Library for PHP. |
||
8 | // |
||
9 | // You should have received a copy of the MIT License along with |
||
10 | // the library. If not, see <http://opensource.org/licenses/MIT>. |
||
11 | // |
||
12 | //---------------------------------------------------------------------- |
||
13 | |||
14 | namespace Linode; |
||
15 | |||
16 | /** |
||
17 | * This class is autogenerated. |
||
18 | * |
||
19 | * @version Linode API v3.3 |
||
20 | */ |
||
21 | class StackScriptApi extends BaseLinodeApi |
||
22 | { |
||
23 | /** |
||
24 | * Create a StackScript. |
||
25 | * |
||
26 | * @param string $script [required] The actual script |
||
27 | * @param string $DistributionIDList [required] Comma delimited list of DistributionIDs that this script works on |
||
28 | * @param string $Label [required] The Label for this StackScript |
||
29 | * @param string $Description [optional] |
||
30 | * @param bool $isPublic [optional] Whether this StackScript is published in the Library, for everyone to use |
||
31 | * @param string $rev_note [optional] |
||
32 | * |
||
33 | * @return array |
||
34 | */ |
||
35 | 1 | public function create($script, $DistributionIDList, $Label, $Description = null, $isPublic = null, $rev_note = null) |
|
36 | { |
||
37 | 1 | return $this->call('stackscript.create', [ |
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
38 | 1 | 'script' => $script, |
|
39 | 1 | 'DistributionIDList' => $DistributionIDList, |
|
40 | 1 | 'Label' => $Label, |
|
41 | 1 | 'Description' => $Description, |
|
42 | 1 | 'isPublic' => $isPublic, |
|
43 | 1 | 'rev_note' => $rev_note, |
|
44 | ]); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param int $StackScriptID [required] |
||
49 | * |
||
50 | * @return array |
||
51 | */ |
||
52 | 1 | public function delete($StackScriptID) |
|
53 | { |
||
54 | 1 | return $this->call('stackscript.delete', [ |
|
0 ignored issues
–
show
|
|||
55 | 1 | 'StackScriptID' => $StackScriptID, |
|
56 | ]); |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * Lists StackScripts you have access to. |
||
61 | * |
||
62 | * @param int $StackScriptID [optional] Limits the list to the specified StackScriptID |
||
63 | * |
||
64 | * @return array |
||
65 | */ |
||
66 | 1 | public function getList($StackScriptID = null) |
|
67 | { |
||
68 | 1 | return $this->call('stackscript.list', [ |
|
0 ignored issues
–
show
|
|||
69 | 1 | 'StackScriptID' => $StackScriptID, |
|
70 | ]); |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * Update a StackScript. |
||
75 | * |
||
76 | * @param int $StackScriptID [required] |
||
77 | * @param string $script [optional] The actual script |
||
78 | * @param string $DistributionIDList [optional] Comma delimited list of DistributionIDs that this script works on |
||
79 | * @param string $Label [optional] The Label for this StackScript |
||
80 | * @param string $Description [optional] |
||
81 | * @param bool $isPublic [optional] Whether this StackScript is published in the Library, for everyone to use |
||
82 | * @param string $rev_note [optional] |
||
83 | * |
||
84 | * @return array |
||
85 | */ |
||
86 | 1 | public function update($StackScriptID, $script = null, $DistributionIDList = null, $Label = null, $Description = null, $isPublic = null, $rev_note = null) |
|
87 | { |
||
88 | 1 | return $this->call('stackscript.update', [ |
|
0 ignored issues
–
show
|
|||
89 | 1 | 'StackScriptID' => $StackScriptID, |
|
90 | 1 | 'script' => $script, |
|
91 | 1 | 'DistributionIDList' => $DistributionIDList, |
|
92 | 1 | 'Label' => $Label, |
|
93 | 1 | 'Description' => $Description, |
|
94 | 1 | 'isPublic' => $isPublic, |
|
95 | 1 | 'rev_note' => $rev_note, |
|
96 | ]); |
||
97 | } |
||
98 | } |
||
99 |