1 | module.exports = {
|
2 |
|
3 | name: "<%=name%>",
|
4 |
|
5 | label: "<%=label%>",
|
6 |
|
7 | description: `<%=description%>`,
|
8 |
|
9 | input: {
|
10 | title: "<%=name%>",
|
11 | type: "object",
|
12 | properties: <%=input%>
|
13 | },
|
14 |
|
15 | output: {
|
16 | title: "output",
|
17 | type: "object",
|
18 | properties: <%=output%>
|
19 | },
|
20 |
|
21 | execute: function (input, output) {
|
22 | // to access auth info use input.auth , eg: input.auth.username
|
23 | // and to return output use output callback like this output(null, { "notice" : "successful"})
|
24 | // your code here
|
25 | var request = require("request");
|
26 | <%= requestOption %>
|
27 | request(option, function (error, response, body) {
|
28 | if (error) {
|
29 | output(error);
|
30 | }
|
31 | if (response.statusCode >= 200 || response.statusCode == 201) {
|
32 | output(null, body);
|
33 | }
|
34 | });
|
35 | }
|
36 | }
|
37 |
|
\ | No newline at end of file |