@@ -90,6 +90,14 @@ def standby_os(self):
90
90
resp = self .device .action (self .url + "/standbyOS" )
91
91
return resp
92
92
93
+ def get_storage_info (self ):
94
+ """
95
+
96
+ :return:
97
+ """
98
+ resp = self .device .action (self .url + "/getStorageInfos?path" )
99
+ return resp
100
+
93
101
94
102
class Jd :
95
103
"""
@@ -147,6 +155,51 @@ def update_available(self):
147
155
resp = self .is_update_available ()
148
156
return resp
149
157
158
+
159
+ class Config :
160
+ """
161
+ Class that represents the Config of a Device
162
+ """
163
+
164
+ def __init__ (self , device ):
165
+ self .device = device
166
+ self .url = '/config'
167
+
168
+ def list (self ):
169
+ """
170
+ :return: List<AdvancedConfigAPIEntry>
171
+ """
172
+ resp = self .device .action (self .url + "/list" )
173
+ return resp
174
+
175
+ def get (self , interface_name , storage , key ):
176
+ """
177
+ :param interfaceName: a valid interface name from List<AdvancedConfigAPIEntry>
178
+ :type: str:
179
+ :param storage: 'null' to use default or 'cfg/' + interfaceName
180
+ :type: str:
181
+ :param key: a valid key from from List<AdvancedConfigAPIEntry>
182
+ :type: str:
183
+ """
184
+ params = [interface_name , storage , key ]
185
+ resp = self .device .action (self .url + "/get" , params )
186
+ return resp
187
+
188
+ def set (self , interface_name , storage , key , value ):
189
+ """
190
+ :param interfaceName: a valid interface name from List<AdvancedConfigAPIEntry>
191
+ :type: str:
192
+ :param storage: 'null' to use default or 'cfg/' + interfaceName
193
+ :type: str:
194
+ :param key: a valid key from from List<AdvancedConfigAPIEntry>
195
+ :type: str:
196
+ :param value: a valid value for the given key (see type value from List<AdvancedConfigAPIEntry>)
197
+ :type: Object:
198
+ """
199
+ params = [interface_name , storage , key , value ]
200
+ resp = self .device .action (self .url + "/set" , params )
201
+ return resp
202
+
150
203
151
204
class DownloadController :
152
205
"""
@@ -760,6 +813,7 @@ def __init__(self, jd, device_dict):
760
813
self .device_id = device_dict ["id" ]
761
814
self .device_type = device_dict ["type" ]
762
815
self .myjd = jd
816
+ self .config = Config (self )
763
817
self .linkgrabber = Linkgrabber (self )
764
818
self .captcha = Captcha (self )
765
819
self .downloads = Downloads (self )
0 commit comments