This commit is contained in:
2025-03-28 16:27:07 +01:00
parent d2848447b6
commit 6d33ec5727
7 changed files with 216 additions and 59 deletions

View File

@@ -4,8 +4,8 @@ const key = 'NWmMhlPAbPlVnaDqVGyX';
const secret = 'hZPaoBiGiSwlCjARrbOICOpDuITwyJAm';
const perPage = 100;
export async function discogsearch(query, type) {
const url = `${baseUrlsearch}?q=${query}&type=${type}&per_page=${perPage}&key=${key}&secret=${secret}`;
export async function discogsearch(query, type, page = 1) {
const url = `${baseUrlsearch}?q=${query}&type=${type}&per_page=${perPage}&page=${page}&key=${key}&secret=${secret}`;
const response = await fetch(url);
return await response.json();
}