Agregada vista de artista
This commit is contained in:
16
src/services/entity_service.js
Normal file
16
src/services/entity_service.js
Normal 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user