knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The goal of musicbrainz is to make it easy to call the MusicBrainz api from R.
You can install musicbrainz from github with:
# install.packages("devtools") devtools::install_github("mikkelkrogsholm/musicbrainz")
This is a basic example which shows you how to solve a common problem.
Lets find the Prince of Darkness in MusicBrainz
library(musicbrainz) ozzy_search <- mb_search("artist", 'artist:"ozzy osbourne"')
We can then see Ozzys mbid
ozzy_search[["artists"]][[1]][["id"]]
And if we have a mbid then we can call the lookup function with that id.
ozzy_lookup <- mb_lookup("artist", "8aa5b65a-5b3c-4029-92bf-47a544356934")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.