#!/bin/bash

visited_artists=()

function artist_tracks() {
    # https://soundcloud.com/#{artist}/tracks
}

function artist_likes() {
    # https://soundcloud.com/#{artist}/likes
}

function artist_follows() {
    artist_follows=[]

    # https://soundcloud.com/#{artist}/following

    return artist_follows
}

function scrape_artist() {
    artist="$1"

    # Check if we've visited this artist before
    if [[ " ${visited_artists[*]} " =~ ${artist} ]]; then
        return
    fi
    visited_artists+=("$artist")

    # Grab artist tracks

    # Grab likes

    # Traverse follows


    for next_artist in "${artist_follows[@]}"; do
        scrape_artist "$next_artist"
    done
}

start_artist="$1" # grab from arg
scrape_artist "$start_artist"