Agregada vista de artista

This commit is contained in:
Daniel Cortes
2020-06-06 05:52:15 -04:00
parent 084845f347
commit 0af23a9a3a
7 changed files with 302 additions and 62 deletions

View File

@@ -0,0 +1,16 @@
import axios from 'axios';
let baseUrl = `${process.env.REACT_APP_API_SERVER}/api/brainz`;
export async function getArtist(mbid) {
const url = `${baseUrl}/artist/${mbid}`;
const response = await axios.get(url);
return response.data
}
export async function getArtistDiscs(mbid, per_page=10) {
const url = `${baseUrl}/artist/${mbid}/discs?per_page=${per_page}`;
const response = await axios.get(url);
return response.data
}