Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Documentation
class MonadIO m => MonadSpotify m where Source #
getManager :: m Manager Source #
getToken :: m AccessToken Source #
putToken :: AccessToken -> m () Source #
throwClientError :: ClientError -> m a Source #
Instances
Instances
MonadIO Spotify Source # | |
Applicative Spotify Source # | |
Functor Spotify Source # | |
Monad Spotify Source # | |
MonadSpotify Spotify Source # | |
MonadError ClientError Spotify Source # | |
Defined in Spotify throwError :: ClientError -> Spotify a # catchError :: Spotify a -> (ClientError -> Spotify a) -> Spotify a # | |
MonadState AccessToken Spotify Source # | |
MonadReader (Auth, Manager) Spotify Source # | |
runSpotify :: Auth -> Spotify a -> IO (Either ClientError a) Source #
runSpotify' :: Maybe Manager -> Maybe AccessToken -> Auth -> Spotify a -> IO (Either ClientError (a, AccessToken)) Source #
liftEitherSpot :: MonadSpotify m => Either ClientError a -> m a Source #
inSpot :: forall m a. MonadSpotify m => (AccessToken -> ClientM a) -> m a Source #
Auth | |
|
marketFromToken :: Maybe Market Source #
withPagingParams :: PagingParams -> (Maybe Int -> Maybe Int -> t) -> t Source #
data PagingParams Source #
newToken :: MonadSpotify m => m TokenResponse Source #
newTokenIO :: Auth -> Manager -> IO (Either ClientError TokenResponse) Source #
newTokenIO' :: MonadIO m => Manager -> ClientId -> ClientSecret -> URL -> AuthCode -> m (Either ClientError TokenResponse') Source #
authorizeUrl :: ClientId -> URL -> Maybe (Set Scope) -> URL Source #
getAlbum :: MonadSpotify m => AlbumID -> m Album Source #
getAlbumTracks :: MonadSpotify m => AlbumID -> PagingParams -> m (Paging TrackSimple) Source #
removeAlbums :: MonadSpotify m => [AlbumID] -> m () Source #
getArtist :: MonadSpotify m => ArtistID -> m Artist Source #
getTrack :: MonadSpotify m => TrackID -> m Track Source #
getSavedTracks :: MonadSpotify m => PagingParams -> m (Paging SavedTrack) Source #
saveTracks :: MonadSpotify m => [TrackID] -> m () Source #
removeTracks :: MonadSpotify m => [TrackID] -> m () Source #
search :: MonadSpotify m => Text -> [SearchType] -> Maybe Text -> Maybe Market -> PagingParams -> m SearchResult Source #
getMe :: MonadSpotify m => m User Source #
getUser :: MonadSpotify m => UserID -> m User Source #
unfollowPlaylist :: MonadSpotify m => PlaylistID -> m () Source #
getPlaylist :: MonadSpotify m => PlaylistID -> m Playlist Source #
addToPlaylist :: MonadSpotify m => PlaylistID -> Maybe Int -> [URI] -> m Text Source #
getMyPlaylists :: MonadSpotify m => PagingParams -> m (Paging PlaylistSimple) Source #
createPlaylist :: MonadSpotify m => UserID -> CreatePlaylistOpts -> m PlaylistSimple Source #
getCategories :: MonadSpotify m => CategoryID -> Maybe Country -> Maybe Locale -> m Category Source #
getPlaybackState :: MonadSpotify m => Maybe Market -> m PlaybackState Source #
transferPlayback :: MonadSpotify m => [DeviceID] -> Bool -> m () Source #
getAvailableDevices :: MonadSpotify m => m [Device] Source #
getCurrentlyPlayingTrack :: MonadSpotify m => Maybe Market -> m CurrentlyPlayingTrack Source #
startPlayback :: MonadSpotify m => Maybe DeviceID -> StartPlaybackOpts -> m () Source #
pausePlayback :: MonadSpotify m => Maybe DeviceID -> m () Source #
skipToNext :: MonadSpotify m => Maybe DeviceID -> m () Source #
skipToPrevious :: MonadSpotify m => Maybe DeviceID -> m () Source #
seekToPosition :: MonadSpotify m => Int -> Maybe DeviceID -> m () Source #