Functions for the Last.fm Track API methods.
Read functions take the artist name first and the track name second. Write
functions additionally take a session key obtained via Lastex.Auth.
Summary
Functions
Tags a track with one or more tags (track.addTags).
Returns the canonical track name for a possibly misspelled one (track.getCorrection).
Fetches metadata for a track (track.getInfo).
Loves a track on behalf of the authenticated user (track.love).
Removes a single tag from a track (track.removeTag). Requires a session key.
Searches for tracks by name (track.search).
Fetches tracks similar to the given one (track.getSimilar).
Fetches the tags a user has applied to a track (track.getTags).
Fetches the most popular tags for a track (track.getTopTags).
Removes a track from the authenticated user's loved tracks (track.unlove).
Functions
Tags a track with one or more tags (track.addTags).
tags is a comma-separated string of up to 10 tags. Requires a session key.
Lastex.Track.add_tags("Opeth", "Blackwater Park", "progressive metal", session_key)
Returns the canonical track name for a possibly misspelled one (track.getCorrection).
Lastex.Track.correction("opeth", "blackwater park")
Fetches metadata for a track (track.getInfo).
Pass username: "name" to include that user's playcount and loved status, or
autocorrect: 1 to correct misspelled names.
Lastex.Track.info("Opeth", "Blackwater Park")
Loves a track on behalf of the authenticated user (track.love).
Lastex.Track.love("Opeth", "Blackwater Park", session_key)
Removes a single tag from a track (track.removeTag). Requires a session key.
Lastex.Track.remove_tag("Opeth", "Blackwater Park", "progressive metal", session_key)
Searches for tracks by name (track.search).
Returns a Lastex.Page. Supports limit, page, and artist to narrow the
search.
Lastex.Track.search("Blackwater Park", limit: 5)
Fetches tracks similar to the given one (track.getSimilar).
Returns a Lastex.Page. Supports limit and autocorrect.
Lastex.Track.similar("Opeth", "Blackwater Park", limit: 10)
Fetches the tags a user has applied to a track (track.getTags).
Returns a Lastex.Page. Pass user: "name" to read another user's tags, or a
session key via sk to read your own.
Lastex.Track.tags("Opeth", "Blackwater Park", user: "rj")
Fetches the most popular tags for a track (track.getTopTags).
Returns a Lastex.Page.
Lastex.Track.top_tags("Opeth", "Blackwater Park")
Removes a track from the authenticated user's loved tracks (track.unlove).
Lastex.Track.unlove("Opeth", "Blackwater Park", session_key)