Skip to content

An easy to use, object oriented API wrapper for the Spotify Web API.

License

Notifications You must be signed in to change notification settings

spotifyts/spotify.ts

Repository files navigation

spotify.ts logo

spotify.ts

About

spotify.ts is a TypeScript wrapper for Spotify's Web API, designed to make interacting with Spotify's services easy and efficient.

Features

  • Fast Performance
  • Object-Oriented Design
  • Support for TypeScript, ESM, and CJS
  • Easy to Use

Installation

You can install spotify.ts using one of the following package managers:

npm install spotify.ts
yarn add spotify.ts
pnpm add spotify.ts

Usage

To 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).

Examples

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);
});

Links

Contributors

FC
FC

💻 🤔 🚧 📆
Prashanth Rajaram
Prashanth Rajaram

💻