LastfmArchive.Transform (lastfm_archive v0.8.0) View Source
This module provides functions for reading and transforming downloaded Lastfm data.
Link to this section Summary
Functions
Read and parse a raw Lastfm JSON file from the archive for a Lastfm user.
Transform a downloaded raw JSON page into a list of tab-delimited track data.
Link to this section Functions
Specs
read(binary(), binary()) :: {:ok, map()} | {:error, :file.posix()}
Read and parse a raw Lastfm JSON file from the archive for a Lastfm user.
Specs
transform(binary(), binary(), :atom) :: [binary()] | {:error, :file.posix()}
Transform a downloaded raw JSON page into a list of tab-delimited track data.
Example
# transform a page of scrobbles from the file archive
LastfmArchive.Transform.transform("a_lastfm_user", "2007/200_1.gz")A row of tab-delimited track currently contains (if any):
idauto-generated by the system to uniquely identify a scrobblenamethe track namescrobble_dateUnix timestamp of the scrobble datescrobble_date_isoscrobble date in ISO 8601 datetime formatmbidMusicBrainz identifier for the trackurlweb address of the track on Last.fmartistartist_mbidMusicBrainz identifier for the artistartist_urlweb address of the artist on Last.fmalbumalbum_mbidMusicBrainz identifier for the album