-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapi.js
52 lines (52 loc) · 1.45 KB
/
api.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
// retrieve logs
async getLogs({ homey }) {
const result = await homey.app.getLogs();
return result;
},
// delete logs
async deleteLogs({ homey }) {
const result = await homey.app.deleteLogs();
return result;
},
// get resolution list
async getResolutions({ homey }) {
const result = await homey.app.getResolutions();
return result;
},
// get app list
async getAppList({ homey }) {
const result = await homey.app.getAppList();
return result;
},
// stop export
async stopExport({ homey }) {
const result = await homey.app.stopExport();
return result;
},
// make full backup from frontend
async exportAll({ homey, body }) {
// access the post body and perform some action on it.
return homey.app.exportAll(body.resolution);
},
// make app backup from frontend
async exportApp({ homey, body }) {
// access the post body and perform some action on it.
return homey.app.exportApp(body.appId, body.resolution);
},
// test SMB settings from frontend
async testSmb({ homey, body }) {
// access the post body and perform some action on it.
return homey.app.testSmb(body);
},
// test FTP settings from frontend
async testFTP({ homey, body }) {
// access the post body and perform some action on it.
return homey.app.testFTP(body);
},
// test WebDAV settings from frontend
async testWebdav({ homey, body }) {
// access the post body and perform some action on it.
return homey.app.testWebdav(body);
},
};