spotify: Spotify Web API

[ bsd3, library, music, program, web ] [ Propose Tags ]

Bindings for interacting with the Spotify Web API


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
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-22T19:26:35Z
Distributions
Executables examples
Downloads 71 total (5 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-22 [all 1 reports]

Readme for spotify-0.1.0.0

[back to package description]

Spotify Web API bindings for Haskell

Built around Servant + Aeson.

Work in progress. Will be put on Hackage once remotely stable.

Designed to be very high-level (eg. handling token refresh etc. automatically). I can think about exposing the lower level functionality if anyone requests it.

Designed for use with lenses and/or modern record extensions, eg. to work around duplicated identifiers. This allows us to mirror the Spotify API in a methodical way without being too verbose. RecordDotSyntax will suit us nicely whenever it lands.

All request take place inside a monad implementing MonadSpotify. In particular, this abstracts away authentication - 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 - this 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.