Socket
Socket
Sign inDemoInstall

spotify.ts

Package Overview
Dependencies
5
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    spotify.ts

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


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

1.3.0 (2022-10-31)

Features

  • audiobook-tests: Add audiobook unit tests (253f28d)

Bug Fixes

  • deps: update dependency @discordjs/collection to ^1.2.0 (013e220)
  • secrets not being passed to tests (777b932)

Readme

Source

spotify.ts

About

spotify.ts is an wrapper built around Spotify's Web API.

Features

  • Fast
  • Object Oriented
  • Typescript, ESM, CJS support
  • Easy to Use

Installing

npm i spotify.ts
yarn add spotify.ts
pnpm add spotify.ts

Usage

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

Examples:

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

Contributors

FC
FC

💻 🤔 🚧 📆
Prashanth Rajaram
Prashanth Rajaram

💻

FAQs

Last updated on 31 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc