module Network.Lastfm.API.Tag
( getInfo, getSimilar, getTopAlbums, getTopArtists, getTopTags, getTopTracks
, getWeeklyArtistChart, getWeeklyChartList, search
) where
import Control.Monad.Error (runErrorT)
import Network.Lastfm
getInfo :: Tag -> Maybe Language -> APIKey -> Lastfm Response
getInfo tag language apiKey = callAPI
[ (#) (Method "tag.getInfo")
, (#) tag
, (#) language
, (#) apiKey
]
getSimilar :: Tag -> APIKey -> Lastfm Response
getSimilar tag apiKey = callAPI
[ (#) (Method "tag.getSimilar")
, (#) tag
, (#) apiKey
]
getTopAlbums :: Tag -> Maybe Page -> Maybe Limit -> APIKey -> Lastfm Response
getTopAlbums tag page limit apiKey = callAPI
[ (#) (Method "tag.getTopAlbums")
, (#) tag
, (#) page
, (#) limit
, (#) apiKey
]
getTopArtists :: Tag -> Maybe Page -> Maybe Limit -> APIKey -> Lastfm Response
getTopArtists tag limit page apiKey = callAPI
[ (#) (Method "tag.getTopArtists")
, (#) tag
, (#) page
, (#) limit
, (#) apiKey
]
getTopTags :: APIKey -> Lastfm Response
getTopTags apiKey = callAPI
[ (#) (Method "tag.getTopArtists")
, (#) apiKey
]
getTopTracks :: Tag -> Maybe Page -> Maybe Limit -> APIKey -> Lastfm Response
getTopTracks tag limit page apiKey = callAPI
[ (#) (Method "tag.getTopTracks")
, (#) tag
, (#) page
, (#) limit
, (#) apiKey
]
getWeeklyArtistChart :: Tag -> Maybe From -> Maybe To -> Maybe Limit -> APIKey -> Lastfm Response
getWeeklyArtistChart tag from to limit apiKey = callAPI
[ (#) (Method "tag.getWeeklyArtistChart")
, (#) tag
, (#) from
, (#) to
, (#) limit
, (#) apiKey
]
getWeeklyChartList :: Tag -> APIKey -> Lastfm Response
getWeeklyChartList tag apiKey = callAPI
[ (#) (Method "tag.getWeeklyChartList")
, (#) tag
, (#) apiKey
]
search :: Tag -> Maybe Page -> Maybe Limit -> APIKey -> Lastfm Response
search tag page limit apiKey = callAPI
[ (#) (Method "tag.search")
, (#) tag
, (#) page
, (#) limit
, (#) apiKey
]