bandcamp-fetch/examples/fan/getFollowingArtistsAndLabels.ts
patrickkfkan be7010c217 v1.0.0
2023-06-10 22:52:27 +08:00

24 lines
584 B
TypeScript

import bcfetch from '../../';
import util from 'util';
const username = 'patrickkfkan';
const params = {
target: username,
imageFormat: 'bio_featured'
};
bcfetch.fan.getFollowingArtistsAndLabels(params).then(async (results) => {
console.log(util.inspect(results, false, null, false));
if (results.continuation) {
console.log('Fetching more by continuation...');
const moreResults = await bcfetch.fan.getFollowingArtistsAndLabels({
...params,
target: results.continuation
});
console.log(util.inspect(moreResults, false, null, false));
}
});