-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathgetInfo.mjs
More file actions
27 lines (22 loc) · 689 Bytes
/
getInfo.mjs
File metadata and controls
27 lines (22 loc) · 689 Bytes
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
import bcfetch from '../../dist/mjs/index.js';
const artistUrl = 'https://macmccaughan.bandcamp.com';
const labelUrl = 'https://mergerecords.bandcamp.com';
const artistInfoParams = {
bandUrl: artistUrl,
imageFormat: 'art_app_large',
labelId: 1415932000
};
const labelInfoParams = {
bandUrl: labelUrl,
imageFormat: 'art_app_large'
};
bcfetch.band.getInfo(artistInfoParams).then((results) => {
console.log(`Artist URL: ${artistUrl}`);
console.log(JSON.stringify(results, null, 2));
console.log();
});
bcfetch.band.getInfo(labelInfoParams).then((results) => {
console.log(`Label URL: ${labelUrl}`);
console.log(JSON.stringify(results, null, 2));
console.log();
});