Setup, installation
Mix.install(
[{:lastfm_archive, "~> 1.2"}],
config: [
lastfm_archive: [
data_dir: "./lastfm_data/",
user: ""
]
]
)
:ok
Installation
- install and start Livebook
- run this Livebook guide
-
configure Livebook as instructued below, click on
Notebook dependencies and setup
,Setup
(above)
Configuration
Lastfm archive has been configured as a dependency in Setup
above. You need to check and modify the following configs:
-
user
: specify a Lastfm username in this config or share it asLFM_USER
secret (see Secrets management) -
data_dir
(optional): by default archive data is stored in~/lastfm_data/
directory within your home directory. Modifiy this location if other directory is preferred
API key environment variable
To access the API provided by Lastfm, you need to apply for a 32-digit string key. This key will be used when downloading data from the API.
Add the key via a LFM_API_KEY
secret and share it with this Livebook - see Secrets management.
Test the setup
Run the following code (click Evaluate
) to send a test request to Lastfm. If you receive basic details from Lastfm, then you’re all set.
LastfmArchive.Livebook.info()