spoty-0.1.0.2: Spotify web API wrapper

Safe HaskellNone
LanguageHaskell2010

Utils.Spoty

Synopsis

Documentation

getAlbum :: SpotID -> IO Album Source

Retrieve an album.

getAlbumTracks :: SpotID -> Producer Track IO () Source

Retrieve the tracks of an album.

getArtist :: SpotID -> IO Artist Source

Retrieve an artist.

getArtistAlbums :: SpotID -> Producer Album IO () Source

Retrieve the albums of an artist.

type CountryID = Text Source

Country identifier e.g. "SE".

getArtistTop :: SpotID -> CountryID -> IO [Track] Source

Retrieve the most popular tracks of an artist.

getArtistRelated :: SpotID -> IO [Artist] Source

Retrieve a few related artists.

data SearchCategory Source

Categories being used in a search.

Constructors

SearchAlbum

Search for albums.

SearchArtist

Search for artists.

SearchTrack

Search for tracks.

search :: [SearchCategory] -> Text -> (Producer Artist IO (), Producer Album IO (), Producer Track IO ()) Source

Search for some string in the given categories.

searchArtist :: Text -> Producer Artist IO () Source

Search for artists.

searchAlbum :: Text -> Producer Album IO () Source

Search for albums.

searchTrack :: Text -> Producer Track IO () Source

Search for tracks.

getTrack :: SpotID -> IO Track Source

Retrieve a track.

getUser :: Text -> IO User Source

Retrieve an user.

fetchOne :: Monad m => Producer a m () -> m (Maybe a) Source

Fetch one element from the producer and discard the rest.

fetchAll :: Monad m => Producer a m () -> m [a] Source

Fetch all elements from the producer (NOTE: not constant space).