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

24 lines
551 B
TypeScript

import bcfetch from '../../';
import util from 'util';
const username = 'patrickkfkan';
const params = {
target: username,
imageFormat: 'art_app_large'
};
bcfetch.fan.getWishlist(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.getWishlist({
...params,
target: results.continuation
});
console.log(util.inspect(moreResults, false, null, false));
}
});