⚠️ Not ready for production
Soundify
Soundify is a lightweight and flexible library for seamless communication with Spotify API, designed to work smoothly with TypeScript, Deno, Node.js, and client-side JavaScript. It's open source and provides an easy-to-use interface for accessing Spotify's data.
Features ✨
- 💻 Multiruntime: supports Node, Deno and Browser environment.
- 🚀 Modern: It leverages modern web APIs like native
fetch
,crypto
,URLSearchParams
, etc. - 🔑 Comprehensive auth support: It can handle all Spotify Auth flows and automatically refreshes access token.
- 📦 Lightweight and treeshakable: It is designed with care for your bundle size.
- 🆎 Strictly typed: All entities returned by the api have exact and up to date types.
- 📖 Great docs: The library comes with extensive documentation and lots of examples.
Installation
Soundify is split into subpackages:
/auth
- Handles Spotify authorization/api
- Provides client, endpoints and entity types/shared
- General functions and types (used under the hood in/auth
and/api
)
This separation is designed to enable the use of specific package on specific platforms. For example,
@soundify/web-auth
is suitable for browser, while@soundify/node-auth
is appropriate for nodejs. The only difference in these packages is that under the hood they use different platform api to perform the same tasks.
NPM
// "/api" - Can be used both in the browser and in nodejs
import { ... } from "@soudnfiy/api"
// "/web-auth" - Authorization for browser
import { ... } from "@soundify/web-auth"
// "/node-auth" - Authorization for nodejs
import { ... } from "@soundify/node-auth"
Deno
import { ... } from "https://deno.land/x/soundify/mod.ts"