spoty alternatives and similar packages
Based on the "Web" category.
Alternatively, view spoty alternatives based on common mentions on social networks and blogs.
-
swagger-petstore
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
haskell-bitmex-rest
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
neuron
Future-proof note-taking and publishing based on Zettelkasten (superseded by Emanote: https://github.com/srid/emanote) -
tagsoup
Haskell library for parsing and extracting information from (possibly malformed) HTML/XML documents -
keera-hails-reactive-htmldom
Keera Hails: Haskell on Rails - Reactive Programming Framework for Interactive Haskell applications -
ghcjs-dom
Make Document Object Model (DOM) apps that run in any browser and natively using WebKitGtk
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of spoty or a related project?
README
Spotify web API in Haskell
Web API wrapper powered by lens and pipes, allowing easy access to public endpoints. It does not have any external dependencies nor requirements regarding app registration.
- Paging is handled transparently using pipes
- All data types are navigated using lenses
All public endpoints, with multi-get versions excluded, are implemented.
Example (Examples/Search.hs)
> :set -XOverloadedStrings
> :m +Control.Lens Utils.Spoty
> Just artist <- fetchOne (searchArtist "avicii") -- assume at least one match
> popular <- getArtistTop (view spotifyID artist) "SE" -- retrieve the most popular tracks in Sweden
> mapM_ (print . view name) popular -- print the corresponding names
"Hey Brother"
"Addicted To You"
"Wake Me Up"
...
Design
The Utils.Spoty module provides access to all of the included endpoints, as listed in the official documentation. All of the returned objects are defined in Utils.Spoty.Types and have associated lenses. The names have been preserved to a large extent, but URIs and IDs are prefixed with spotify.
Some of the API endpoints return a (potentially long) stream of objects, e.g. when performing a search. This is handled by using pipes. Consider the following signature:
searchArtist ⩬ T.Text → P.Producer Artist IO ∅
Here the returned value is a producer of artist objects.
If you don't need constant-space streaming, then you can extract the corresponding list by calling fetchAll ⩬ Monad m ⇒ P.Producer a m ∅ → m [a]
.
When you're only interested in the first result (e.g. when searching for a well-known artist), it's useful to call fetchOne ⩬ Monad m ⇒ P.Producer a m ∅ → m (Maybe a)
.
In the other cases you will need functions available in the pipes package.
The distinction between full and simple objects has been implemented as details wrapped in an optional Maybe.
Finally, error handling is implemented with exceptions being thrown when HTTP or JSON decoding errors occur.