quasiment fini

This commit is contained in:
2025-03-31 13:15:47 +02:00
parent b5bed05929
commit eabc11d2cc
7 changed files with 374 additions and 202 deletions

View File

@@ -1,5 +1,7 @@
const baseUrlsearch = 'https://api.discogs.com/database/search';
const baseUrlrelease = 'https://api.discogs.com/releases/';
const baseUrlmaster = 'https://api.discogs.com/masters/';
const baseUrlartist = 'https://api.discogs.com/artists/';
const key = 'NWmMhlPAbPlVnaDqVGyX';
const secret = 'hZPaoBiGiSwlCjARrbOICOpDuITwyJAm';
const perPage = 100;
@@ -16,5 +18,17 @@ export async function getReleaseDetails(releaseId) {
return await response.json();
}
export async function getMasterDetails(masterId) {
const response = await fetch(`${baseUrlmaster}${masterId}`);
return await response.json();
}
export async function getArtistDetails(artistId) {
const response = await fetch(`${baseUrlartist}${artistId}`);
return await response.json();
}
window.getReleaseDetails = getReleaseDetails;
window.getMasterDetails = getMasterDetails;
window.getArtistDetails = getArtistDetails;
window.discogsearch = discogsearch;