| Safe Haskell | None |
|---|
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 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
Instances
| HasPrevious (Paging a0) (Maybe URL) |
Constructors
| User | |
Fields
| |
class HasExternalUrls s a | s -> a whereSource
Methods
externalUrls :: Lens' s aSource
class HasSpotifyID s a | s -> a whereSource
class HasSpotifyURI s a | s -> a whereSource
Methods
spotifyURI :: Lens' s aSource
data ArtistDetails Source
Constructors
| ArtistDetails | |
Fields
| |
class HasPopularity s a | s -> a whereSource
Methods
popularity :: Lens' s aSource
Constructors
| Artist | |
Fields | |
class HasDetails s a | s -> a whereSource
Instances
data TrackDetails Source
Constructors
| TrackDetails | |
Fields
| |
class HasAvailableMarkets s a | s -> a whereSource
Methods
availableMarkets :: Lens' s aSource
Instances
Constructors
| Track | |
Fields
| |
Instances
class HasArtists s a | s -> a whereSource
Instances
class HasExplicit s a | s -> a whereSource
Instances
data AlbumDetails Source
Constructors
| AlbumDetails | |
Fields
| |
Instances
class HasReleaseDatePrecision s a | s -> a whereSource
Methods
releaseDatePrecision :: Lens' s aSource
Instances
Constructors
| Album | |
Fields
| |