Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 where Source
identifier :: Lens' s a Source
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 a) Int | |
HasOffset (Paging a) Int | |
HasLimit (Paging a) Int | |
HasHref (Paging a) Text | |
HasPrevious (Paging a) (Maybe URL) | |
HasNext (Paging a) (Maybe URL) | |
HasItems (Paging a) [a] |
class HasPrevious s a | s -> a where Source
HasPrevious (Paging a) (Maybe URL) |
User | |
|
class HasExternalUrls s a | s -> a where Source
externalUrls :: Lens' s a Source
class HasSpotifyID s a | s -> a where Source
class HasSpotifyURI s a | s -> a where Source
spotifyURI :: Lens' s a Source
data ArtistDetails Source
ArtistDetails | |
|
class HasPopularity s a | s -> a where Source
popularity :: Lens' s a Source
class HasDetails s a | s -> a where Source
data TrackDetails Source
class HasAvailableMarkets s a | s -> a where Source
availableMarkets :: Lens' s a Source
class HasExternalIDs s a | s -> a where Source
externalIDs :: Lens' s a Source
Track | |
|
class HasArtists s a | s -> a where Source
data AlbumDetails Source
AlbumDetails | |
|
class HasReleaseDate s a | s -> a where Source
releaseDate :: Lens' s a Source
class HasReleaseDatePrecision s a | s -> a where Source
releaseDatePrecision :: Lens' s a Source
Album | |
|
class HasExternalURLs s a | s -> a where Source
externalURLs :: Lens' s a Source