Safe Haskell | None |
---|
Object declarations and lenses. Should not be imported by user code. Please view the official documentation.
Note that the distinction between full and simple objects is implemented as an optional Maybe field with details.
- type URL = Text
- type SpotID = Text
- type SpotURI = Text
- require :: FromJSON a => Text -> HashMap Text Value -> Parser (Maybe a)
- parseStrMap :: MonadPlus m => HashMap k Value -> (k -> Text -> a) -> m [a]
- data ExternalID = ExternalID {
- _idType :: Text
- _idIdentifier :: Text
- class HasIdentifier s a | s -> a where
- identifier :: Lens' s a
- class HasType s a | s -> a where
- data ExternalURL = ExternalURL {}
- data Image = Image {
- _imageHeight :: Maybe Int
- _imagePath :: URL
- _imageWidth :: Maybe Int
- class HasHeight s a | s -> a where
- class HasPath s a | s -> a where
- class HasWidth s a | s -> a where
- data Paging a = Paging {
- _pagingHref :: Text
- _pagingItems :: [a]
- _pagingLimit :: Int
- _pagingNext :: Maybe URL
- _pagingOffset :: Int
- _pagingPrevious :: Maybe URL
- _pagingTotal :: Int
- class HasHref s a | s -> a where
- class HasItems s a | s -> a where
- class HasLimit s a | s -> a where
- class HasNext s a | s -> a where
- class HasOffset s a | s -> a where
- class HasPrevious s a | s -> a where
- class HasTotal s a | s -> a where
- data User = User {}
- class HasExternalUrls s a | s -> a where
- externalUrls :: Lens' s a
- class HasSpotifyID s a | s -> a where
- class HasSpotifyURI s a | s -> a where
- spotifyURI :: Lens' s a
- data ArtistDetails = ArtistDetails {
- _artistGenres :: [Text]
- _artistImages :: [Image]
- _artistPopularity :: Int
- class HasGenres s a | s -> a where
- class HasImages s a | s -> a where
- class HasPopularity s a | s -> a where
- popularity :: Lens' s a
- data Artist = Artist {}
- class HasDetails s a | s -> a where
- class HasName s a | s -> a where
- data TrackDetails = TrackDetails {}
- class HasAvailableMarkets s a | s -> a where
- availableMarkets :: Lens' s a
- class HasExternalIDs s a | s -> a where
- externalIDs :: Lens' s a
- data Track = Track {}
- class HasArtists s a | s -> a where
- class HasDiscNumber s a | s -> a where
- discNumber :: Lens' s a
- class HasDurationMs s a | s -> a where
- durationMs :: Lens' s a
- class HasExplicit s a | s -> a where
- class HasNumber s a | s -> a where
- class HasPreviewURL s a | s -> a where
- previewURL :: Lens' s a
- data AlbumDetails = AlbumDetails {}
- class HasReleaseDate s a | s -> a where
- releaseDate :: Lens' s a
- class HasReleaseDatePrecision s a | s -> a where
- releaseDatePrecision :: Lens' s a
- class HasTracks s a | s -> a where
- data Album = Album {}
- class HasExternalURLs s a | s -> a where
- externalURLs :: Lens' s a
Documentation
require :: FromJSON a => Text -> HashMap Text Value -> Parser (Maybe a)Source
Require that a field is present before parsing the corresponding value.
parseStrMap :: MonadPlus m => HashMap k Value -> (k -> Text -> a) -> m [a]Source
Parse a map of key-value entries, wrapped in the given constructor.
data ExternalID Source
ExternalID | |
|
class HasIdentifier s a | s -> a whereSource
identifier :: Lens' s aSource
Image | |
|
Paging | |
|
HasTracks AlbumDetails (Paging Track) | |
Eq a => Eq (Paging a) | |
Ord a => Ord (Paging a) | |
Show a => Show (Paging a) | |
FromJSON a => FromJSON (Paging a) | |
HasTotal (Paging a0) Int | |
HasOffset (Paging a0) Int | |
HasLimit (Paging a0) Int | |
HasHref (Paging a0) Text | |
HasPrevious (Paging a0) (Maybe URL) | |
HasNext (Paging a0) (Maybe URL) | |
HasItems (Paging a0) [a0] |
class HasPrevious s a | s -> a whereSource
HasPrevious (Paging a0) (Maybe URL) |
User | |
|
class HasExternalUrls s a | s -> a whereSource
externalUrls :: Lens' s aSource
class HasSpotifyID s a | s -> a whereSource
class HasSpotifyURI s a | s -> a whereSource
spotifyURI :: Lens' s aSource
data ArtistDetails Source
ArtistDetails | |
|
class HasPopularity s a | s -> a whereSource
popularity :: Lens' s aSource
class HasDetails s a | s -> a whereSource
data TrackDetails Source
class HasAvailableMarkets s a | s -> a whereSource
availableMarkets :: Lens' s aSource
class HasExternalIDs s a | s -> a whereSource
externalIDs :: Lens' s aSource
Track | |
|
class HasArtists s a | s -> a whereSource
data AlbumDetails Source
AlbumDetails | |
|
class HasReleaseDate s a | s -> a whereSource
releaseDate :: Lens' s aSource
class HasReleaseDatePrecision s a | s -> a whereSource
releaseDatePrecision :: Lens' s aSource
Album | |
|
class HasExternalURLs s a | s -> a whereSource
externalURLs :: Lens' s aSource