spotify: Spotify Web API

[ bsd3, library, music, program, web ] [ Propose Tags ] [ Report a vulnerability ]
Versions [RSS] 0.1.0.0, 0.1.0.1
Change log CHANGELOG.md
Dependencies aeson (>=2.1.0 && <2.2), base (>=4.16 && <5), base64-bytestring (>=1.2.1 && <1.3), bytestring (>=0.11.3 && <0.12), composition (>=1.0.2 && <1.1), containers (>=0.6.5 && <0.7), directory (>=1.3.6 && <1.4), exceptions (>=0.10 && <0.11), extra (>=1.7.12 && <1.8), filepath (>=1.4.2 && <1.5), http-api-data (>=0.4.3 && <0.6), http-client (>=0.7.13 && <0.8), http-client-tls (>=0.3.6 && <0.4), http-types (>=0.12.3 && <0.13), lucid (>=2.11 && <2.12), monad-loops (>=0.4.3 && <0.5), mtl (>=2.2.2 && <2.4), pretty-simple (>=4.1 && <4.2), servant (>=0.19 && <0.20), servant-client (>=0.19 && <0.20), servant-lucid (>=0.9 && <0.10), spotify, text (>=1.2.5 && <1.3 || >=2.0 && <2.1), time (>=1.11.1 && <1.13), transformers (>=0.5.6 && <0.7), unordered-containers (>=0.2.19 && <0.3) [details]
License BSD-3-Clause
Author George Thomas
Maintainer George Thomas
Category Music, Web
Home page https://github.com/georgefst/spotify
Source repo head: git clone git://github.com/georgefst/spotify.git
Uploaded by GeorgeThomas at 2023-06-29T23:10:20Z
Distributions
Executables examples
Downloads 116 total (1 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-06-30 [all 1 reports]

Readme for spotify-0.1.0.1

[back to package description]

Spotify Web API bindings for Haskell

Designed to be very high-level (eg. handling token refresh etc. automatically). Though it should be possible to expose more of the lower level functionality if anyone requests it. At the very least, the raw Servant encoding of the API is available in spotify-servant, on which the main library depends.

Designed for use with lenses and/or modern record extensions (OverloadedRecordDot etc.), e.g. to work around duplicated identifiers. This allows us to mirror the Spotify API in a methodical way without being too verbose.

All requests take place inside a monad implementing MonadSpotify. In particular, this abstracts away authentication, meaning that we don't need to explicitly pass tokens around. A concrete monad Spotify is provided, though you'll often want to roll your own. There is also an instance MonadSpotify IO, which caches authentication data to disk, so one should be careful about security. It also creates a new connection Manager for every request, which can be expensive. Thus a State-like monad is preferred for serious code. Nonetheless, being able to run the functions directly in IO can be very convenient, especially from GHCI.