项目作者: jmackie

项目描述 :
🎵 Haskell client library for the Spotify Web API
高级语言: Haskell
项目地址: git://github.com/jmackie/hspotify.git
创建时间: 2020-03-29T11:44:59Z
项目社区:https://github.com/jmackie/hspotify

开源协议:MIT License

下载


hspotify

Build Status

Haskell client library for the Spotify Web API.

Progress

  • Albums
  • Artists
  • Browse
  • Episodes
  • Follow
  • Library
  • Personalization
  • Player
  • Playlists
  • Search
  • Tracks
  • Shows
  • Users Profile

Developing

Common tasks are provided as make targets.

  1. make # build and test
  2. make format # run ormolu
  3. make docs # build haddocks
  4. make ghcid-lib # run ghcid

See make help for the full list.

Note in order to run the tests you’ll need to create an application in your
Spotify developer dashboard and set
the client ID and secret in your environment:

  1. export HSPOTIFY_TEST_CLIENT_ID=<your-client-id>
  2. export HSPOTIFY_TEST_CLIENT_SECRET=<your-client-secret>

If you use Nix there’s also a shell.nix that
provides all the necessary development tools.

  1. nix-shell

General noteso

  • The modules are pretty hefty and take a while to compile. I think that’s fine for now.
  • I used -XDuplicateRecordFields because it was easier to write+read. This is
    fine if, as a consumer of the library, you use -XNamedFieldPuns (see the tests for examples).
  • The user currently has to obtain their own Bearer token because I’m not
    sure there’s a nice way of handling it from within this library.
    See the Authorization Guide
    for more details.