-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathmetadata.examples.js
46 lines (38 loc) · 1007 Bytes
/
metadata.examples.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
'use strict';
const { log, store } = require('./services');
//#product-info-example
const productInfo = client =>
client.productInfo().then(result => log('product-info-example', result));
//#
//#databases-info-example
const databases = client =>
client.databases().then(result => log('databases-info-example', result));
//#
//#layouts-example
const layouts = client =>
client.layouts().then(result => log('layouts-example', result));
//#
//#layout-details-example
const layout = client =>
client
.layout(process.env.LAYOUT)
.then(result => log('layout-details-example', result));
//#
//#scripts-example
const scripts = client =>
client
.scripts(process.env.LAYOUT)
.then(result => log('scripts-example', result));
//#
const metadata = client =>
Promise.all([
productInfo(client),
databases(client),
layouts(client),
layout(client),
scripts(client)
]).then(responses => {
store(responses);
return client;
});
module.exports = { metadata };