spotify.ts is an wrapper built around Spotify's Web API.
- Fast
- Object Oriented
- Typescript, ESM, CJS support
- Easy to Use
npm i spotify.ts
yarn add spotify.ts
pnpm add spotify.ts
First, import Client
from the library, then instantiate a a new client with the clientId
and clientSecret
credentials. Then you can use the managers to make API calls to the Spotify API. For an in-built guide, visit the documentation site (see below).
Fetch an album:
import { Client } from 'spotify.ts';
const client = new Client({
clientId: 'some-id',
clientSecret: 'some-secret'
});
client.start().then(() => {
client.albums.fetch('0NLkVxf0PyxsXBG3EuZcJf').then(console.log);
});
Fetch an artist:
import { Client } from 'spotify.ts';
const client = new Client({
clientId: 'some-id',
clientSecret: 'some-secret'
});
client.start().then(() => {
client.artists.fetch('4gdMJYnopf2nEUcanAwstx').then(console.log);
});
- Documentation (Coming Soon)
- Discord Server
- Github Organization
- NPM Page