quasiment fini
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user