UNPKG

834 BJavaScriptView Raw
1// Add your function in module.exports
2
3module.exports = {
4
5 "name":"<%=id%>",
6
7 "label":"<%=label%>",
8 // add input data lookup will depend on for
9 // eg: if auth is oauth so add access_token inside auth object
10 // you can also add other input properties which are mentioned in action/trigger
11 "mock_input": {
12 "auth": { }
13 },
14 "search": <%=search%>,
15 "execute": function (input, options, output){
16 // to access auth info use input.auth , eg: input.auth.username
17 // and to return output use output callback like this output(null, [{ id : "item_id", value : "Item Title"}])
18 // output should be an array of objects containing id and value keys.
19 // your code goes here
20
21 output(null, [
22 {
23 id : "item_1",
24 value : "Item 1"
25 },
26 {
27 id : "item_2",
28 value : "Item 2"
29 }
30 ]);
31 }
32
33}
\No newline at end of file