packages feed

liblastfm-0.0.3.0: src/Network/Lastfm/API/Group.hs

module Network.Lastfm.API.Group
  ( getHype, getMembers, getWeeklyChartList, getWeeklyAlbumChart, getWeeklyArtistChart, getWeeklyTrackChart
  ) where

import Network.Lastfm

getHype ∷ ResponseType → Group → APIKey → Lastfm Response
getHype t group apiKey = callAPI t
  [ (#) (Method "group.getHype")
  , (#) group
  , (#) apiKey
  ]

getMembers ∷ ResponseType → Group → Maybe Page → Maybe Limit → APIKey → Lastfm Response
getMembers t group page limit apiKey = callAPI t
  [ (#) (Method "group.getMembers")
  , (#) group
  , (#) page
  , (#) limit
  , (#) apiKey
  ]

getWeeklyChartList ∷ ResponseType → Group → APIKey → Lastfm Response
getWeeklyChartList t group apiKey = callAPI t
  [ (#) (Method "group.getWeeklyChartList")
  , (#) group
  , (#) apiKey
  ]

getWeeklyAlbumChart ∷ ResponseType → Group → Maybe From → Maybe To → APIKey → Lastfm Response
getWeeklyAlbumChart t group from to apiKey = callAPI t
  [ (#) (Method "group.getWeeklyAlbumChart")
  , (#) group
  , (#) from
  , (#) to
  , (#) apiKey
  ]

getWeeklyArtistChart ∷ ResponseType → Group → Maybe From → Maybe To → APIKey → Lastfm Response
getWeeklyArtistChart t group from to apiKey = callAPI t
  [ (#) (Method "group.getWeeklyArtistChart")
  , (#) group
  , (#) from
  , (#) to
  , (#) apiKey
  ]


getWeeklyTrackChart ∷ ResponseType → Group → Maybe From → Maybe To → APIKey → Lastfm Response
getWeeklyTrackChart t group from to apiKey = callAPI t
  [ (#) (Method "group.getWeeklyTrackChart")
  , (#) group
  , (#) from
  , (#) to
  , (#) apiKey
  ]