Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utils.Spoty.Types
Description
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
Constructors
ExternalID | |
Fields
|
data ExternalURL Source
Constructors
ExternalURL | |
Constructors
Image | |
Fields
|
Constructors
Paging | |
Fields
|
Instances
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
Instances
HasPrevious (Paging a) (Maybe URL) |
Constructors
User | |
Fields
|
class HasExternalUrls s a | s -> a where Source
Methods
externalUrls :: Lens' s a Source
class HasSpotifyID s a | s -> a where Source
class HasSpotifyURI s a | s -> a where Source
Methods
spotifyURI :: Lens' s a Source
data ArtistDetails Source
Constructors
ArtistDetails | |
Fields
|
class HasPopularity s a | s -> a where Source
Methods
popularity :: Lens' s a Source
Constructors
Artist | |
Fields |
class HasDetails s a | s -> a where Source
Instances
data TrackDetails Source
Constructors
TrackDetails | |
Fields
|
class HasAvailableMarkets s a | s -> a where Source
Methods
availableMarkets :: Lens' s a Source
Instances
Constructors
Track | |
Fields
|
Instances
class HasArtists s a | s -> a where Source
Instances
class HasExplicit s a | s -> a where Source
Instances
data AlbumDetails Source
Constructors
AlbumDetails | |
Fields
|
Instances
class HasReleaseDatePrecision s a | s -> a where Source
Methods
releaseDatePrecision :: Lens' s a Source
Instances
Constructors
Album | |
Fields
|