spotify.ts is a TypeScript wrapper for Spotify's Web API, designed to make interacting with Spotify's services easy and efficient.
- Fast Performance
- Object-Oriented Design
- Support for TypeScript, ESM, and CJS
- Easy to Use
You can install spotify.ts using one of the following package managers:
npm install spotify.tsyarn add spotify.tspnpm add spotify.tsTo get started, import the Client class from the library and create a new instance with your clientId and clientSecret. You can then use the various managers to interact with the Spotify API. For more detailed instructions, visit the documentation site (link coming soon).
Fetch an Album:
import { Client } from 'spotify.ts';
const client = new Client({
clientId: 'your-client-id',
clientSecret: 'your-client-secret'
});
client.start().then(() => {
client.albums.fetch('0NLkVxf0PyxsXBG3EuZcJf').then(console.log);
});Fetch an Artist:
import { Client } from 'spotify.ts';
const client = new Client({
clientId: 'your-client-id',
clientSecret: 'your-client-secret'
});
client.start().then(() => {
client.artists.fetch('4gdMJYnopf2nEUcanAwstx').then(console.log);
});FC 💻 🤔 🚧 📆 |
Prashanth Rajaram 💻 |