GET /artists

Retrieves all artists.

Endpoint URL

http://127.0.0.1:8080/artists

Query Parameters

  • None as this returns an array of every artist object in the data.json file.

Example code

async function () => {
    try {
        const response = await fetch('http://127.0.0.1:8080/artists'); 
        if (!response.ok) {
            throw new Error('Response Status is' + response.status);
        }
        const artists = await response.json();
        // Now you can loop through the artists and load/dispaly them
    } catch (error) {
        alert(error);
    }
};

Example responses

Response Code

  • 200 OK : Returns an array of all artist objects.

Response fields

Name
Type
Description

ArtistName

string

The artist's name.

Quote

string

A quote from one of the artist's songs.

CoverImage

string

Image address of the artist.

SpotifyUrl

string

SpotifyUrl link to one of the artist's playlist.

Card3A

array

The albums of our artist.

Card4

array

My top songs for that artist.

Card1

string

Content for a brief description on who that artist is.

Card2

string

Content for specified artist's rising to popularity explained.

Last updated