This commit is contained in:
ntr committed 2022-07-22 19:51:52 +10:00
commit 87f07ee7dc
5 files changed
+2831

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import fs from 'fs/promises';
import { Client as DiscogsClient } from 'disconnect';
const TOKEN = 'wRTXuYZGOPsIQgKRGKCAkUkidGtvpSfQgPWkYIpD';
async function start() {
await
const discogs = new DiscogsClient({ userToken: TOKEN });
const db = discogs.database();
const list = await discogs.user().wantlist().getReleases('margh');
return db.getRelease(list.wants[0].id);
// const releases = await Promise.all(list.wants.map(l => db.getRelease(l.id)));
// return releases;
}
start()
.then(r => console.log(r))
.catch(e => {
console.error(e);
process.exit(1);
});