Skip to content

Commit b489f66

Browse files
committed
Fixed requested changes
1 parent 53dfeec commit b489f66

File tree

5 files changed

+73
-35
lines changed

5 files changed

+73
-35
lines changed

components/klipfolio/actions/create-datasource/create-datasource.mjs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,44 @@ export default {
1111
name: {
1212
propDefinition: [
1313
app,
14-
"name"
15-
]
14+
"name",
15+
],
1616
},
1717
description: {
1818
propDefinition: [
1919
app,
20-
"description"
21-
]
20+
"description",
21+
],
2222
},
2323
format: {
2424
propDefinition: [
2525
app,
26-
"format"
27-
]
26+
"format",
27+
],
2828
},
2929
connector: {
3030
propDefinition: [
3131
app,
32-
"connector"
33-
]
32+
"connector",
33+
],
3434
},
3535
refreshInterval: {
3636
propDefinition: [
3737
app,
38-
"refreshInterval"
39-
]
38+
"refreshInterval",
39+
],
4040
},
4141
endpointUrl: {
4242
propDefinition: [
4343
app,
44-
"endpointUrl"
45-
]
44+
"endpointUrl",
45+
],
4646
},
4747
method: {
4848
propDefinition: [
4949
app,
50-
"method"
51-
]
50+
"method",
51+
],
5252
},
5353
},
5454

@@ -64,7 +64,7 @@ export default {
6464
properties: {
6565
endpoint_url: this.endpointUrl,
6666
method: this.method,
67-
}
67+
},
6868
},
6969
});
7070
$.export("$summary", `Successfully created Datasource named '${this.name}'`);

components/klipfolio/actions/delete-datasource/delete-datasource.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default {
1111
datasourceId: {
1212
propDefinition: [
1313
app,
14-
"datasourceId"
15-
]
14+
"datasourceId",
15+
],
1616
},
1717
},
1818

components/klipfolio/actions/update-datasource/update-datasource.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ export default {
1111
datasourceId: {
1212
propDefinition: [
1313
app,
14-
"datasourceId"
15-
]
14+
"datasourceId",
15+
],
1616
},
1717
name: {
1818
propDefinition: [
1919
app,
20-
"name"
21-
]
20+
"name",
21+
],
2222
},
2323
description: {
2424
propDefinition: [
2525
app,
26-
"description"
27-
]
26+
"description",
27+
],
2828
},
2929
refreshInterval: {
3030
propDefinition: [
3131
app,
32-
"refreshInterval"
33-
]
32+
"refreshInterval",
33+
],
3434
},
3535
},
3636

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,40 @@
11
export default {
22
DATASOURCE_CONNECTORS: [
3-
'box', 'comscore', 'db', 'dropbox', 'facebook', 'ftp', 'google_adwords', 'google_analytics', 'google_drive', 'google_spreadsheets', 'hubspot', 'iformbuilder', 'marketo', 'omniture', 'radian6', 'salesforce', 'searchMetrics', 'shopify', 'simple_rest', 'survey_monkey', 'versature', 'xero', 'xmla'
3+
"box",
4+
"comscore",
5+
"db",
6+
"dropbox",
7+
"facebook",
8+
"ftp",
9+
"google_adwords",
10+
"google_analytics",
11+
"google_drive",
12+
"google_spreadsheets",
13+
"hubspot",
14+
"iformbuilder",
15+
"marketo",
16+
"omniture",
17+
"radian6",
18+
"salesforce",
19+
"searchMetrics",
20+
"shopify",
21+
"simple_rest",
22+
"survey_monkey",
23+
"versature",
24+
"xero",
25+
"xmla",
426
],
527
REFRESH_INTERVALS: [
6-
'0', '60', '300', '900', '1800', '3600', '7200', '10800', '14400', '43200', '86400'
7-
]
8-
}
28+
"0",
29+
"60",
30+
"300",
31+
"900",
32+
"1800",
33+
"3600",
34+
"7200",
35+
"10800",
36+
"14400",
37+
"43200",
38+
"86400",
39+
],
40+
};

components/klipfolio/klipfolio.app.mjs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,18 @@ export default {
4949
async options() {
5050
const response = await this.getDatasources();
5151
const datasourceIds = response.data.datasources;
52-
return datasourceIds.map(({ id, name }) => ({
52+
return datasourceIds.map(({
53+
id, name,
54+
}) => ({
5355
label: name,
54-
value: id
56+
value: id,
5557
}));
56-
}
58+
},
5759
},
5860
},
5961
methods: {
6062
_baseUrl() {
61-
return `https://app.klipfolio.com/api/1.0`;
63+
return "https://app.klipfolio.com/api/1.0";
6264
},
6365
async _makeRequest(opts = {}) {
6466
const {
@@ -83,14 +85,18 @@ export default {
8385
...args,
8486
});
8587
},
86-
async updateDatasource({ datasourceId, ...args }) {
88+
async updateDatasource({
89+
datasourceId, ...args
90+
}) {
8791
return this._makeRequest({
8892
path: `/datasources/${datasourceId}`,
8993
method: "put",
9094
...args,
9195
});
9296
},
93-
async deleteDatasource({ datasourceId, ...args }) {
97+
async deleteDatasource({
98+
datasourceId, ...args
99+
}) {
94100
return this._makeRequest({
95101
path: `/datasources/${datasourceId}`,
96102
method: "delete",

0 commit comments

Comments
 (0)