{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} -- | Lastfm tag API -- -- This module is intended to be imported qualified: -- -- @ -- import qualified Network.Lastfm.Tag as Tag -- @ module Network.Lastfm.Tag ( getInfo, getSimilar, getTopAlbums, getTopArtists, getTopTags, getTopTracks , getWeeklyArtistChart, getWeeklyChartList, search ) where import Network.Lastfm.Request -- | Get the metadata for a tag -- -- Optional: language -- -- getInfo :: Request f (Tag -> APIKey -> Ready) getInfo = api "tag.getInfo" {-# INLINE getInfo #-} -- | Search for tags similar to this one. Returns tags ranked by similarity, based on listening data. -- -- getSimilar :: Request f (Tag -> APIKey -> Ready) getSimilar = api "tag.getSimilar" {-# INLINE getSimilar #-} -- | Get the top albums tagged by this tag, ordered by tag count. -- -- Optional: 'limit', 'page' -- -- getTopAlbums :: Request f (Tag -> APIKey -> Ready) getTopAlbums = api "tag.getTopAlbums" {-# INLINE getTopAlbums #-} -- | Get the top artists tagged by this tag, ordered by tag count. -- -- Optional: 'limit', 'page' -- -- getTopArtists :: Request f (Tag -> APIKey -> Ready) getTopArtists = api "tag.getTopArtists" {-# INLINE getTopArtists #-} -- | Fetches the top global tags on Last.fm, sorted by popularity (number of times used) -- -- getTopTags :: Request f (APIKey -> Ready) getTopTags = api "tag.getTopTags" {-# INLINE getTopTags #-} -- | Get the top tracks tagged by this tag, ordered by tag count. -- -- Optional: 'limit', 'page' -- -- getTopTracks :: Request f (Tag -> APIKey -> Ready) getTopTracks = api "tag.getTopTracks" {-# INLINE getTopTracks #-} -- | Get an artist chart for a tag, for a given date range. -- If no date range is supplied, it will return the most recent artist chart for this tag. -- -- Optional: 'from', 'to', 'limit' -- -- getWeeklyArtistChart :: Request f (Tag -> APIKey -> Ready) getWeeklyArtistChart = api "tag.getWeeklyArtistChart" {-# INLINE getWeeklyArtistChart #-} -- | Get a list of available charts for this tag, expressed as -- date ranges which can be sent to the chart services. -- -- getWeeklyChartList :: Request f (Tag -> APIKey -> Ready) getWeeklyChartList = api "tag.getWeeklyChartList" {-# INLINE getWeeklyChartList #-} -- | Search for a tag by name. Returns matches sorted by relevance. -- -- Optional: 'limit', 'page' -- -- search :: Request f (Tag -> APIKey -> Ready) search = api "tag.search" {-# INLINE search #-}