spoty-0.1.0.2: Spotify web API wrapper

Safe HaskellNone
LanguageHaskell2010

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.

Synopsis

Documentation

type URL = Text Source

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.

class HasIdentifier s a | s -> a where Source

Methods

identifier :: Lens' s a Source

class HasType s a | s -> a where Source

Methods

type :: Lens' s a Source

class HasHeight s a | s -> a where Source

Methods

height :: Lens' s a Source

Instances

class HasPath s a | s -> a where Source

Methods

path :: Lens' s a Source

Instances

class HasWidth s a | s -> a where Source

Methods

width :: Lens' s a Source

Instances

class HasHref s a | s -> a where Source

Methods

href :: Lens' s a Source

class HasItems s a | s -> a where Source

Methods

items :: Lens' s a Source

Instances

HasItems (Paging a) [a] 

class HasLimit s a | s -> a where Source

Methods

limit :: Lens' s a Source

Instances

class HasNext s a | s -> a where Source

Methods

next :: Lens' s a Source

Instances

class HasOffset s a | s -> a where Source

Methods

offset :: Lens' s a Source

Instances

class HasPrevious s a | s -> a where Source

Methods

previous :: Lens' s a Source

Instances

class HasTotal s a | s -> a where Source

Methods

total :: Lens' s a Source

Instances

class HasGenres s a | s -> a where Source

Methods

genres :: Lens' s a Source

class HasImages s a | s -> a where Source

Methods

images :: Lens' s a Source

class HasName s a | s -> a where Source

Methods

name :: Lens' s a Source

class HasArtists s a | s -> a where Source

Methods

artists :: Lens' s a Source

class HasDiscNumber s a | s -> a where Source

Methods

discNumber :: Lens' s a Source

class HasDurationMs s a | s -> a where Source

Methods

durationMs :: Lens' s a Source

class HasExplicit s a | s -> a where Source

Methods

explicit :: Lens' s a Source

class HasNumber s a | s -> a where Source

Methods

number :: Lens' s a Source

Instances

class HasPreviewURL s a | s -> a where Source

Methods

previewURL :: Lens' s a Source

class HasReleaseDate s a | s -> a where Source

Methods

releaseDate :: Lens' s a Source

class HasTracks s a | s -> a where Source

Methods

tracks :: Lens' s a Source

class HasExternalURLs s a | s -> a where Source

Methods

externalURLs :: Lens' s a Source