bandcamp-fetch/examples/fan/getFollowingGenres.ts

24 lines
566 B
TypeScript
Raw Permalink Normal View History

2023-06-10 16:52:27 +02:00
import bcfetch from '../../';
import util from 'util';
const username = 'patrickkfkan';
const params = {
target: username,
imageFormat: 'art_tags_large'
};
bcfetch.fan.getFollowingGenres(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.getFollowingGenres({
...params,
target: results.continuation
});
console.log(util.inspect(moreResults, false, null, false));
}
});