Socket
Socket
Sign inDemoInstall

@rygent/spotify

Package Overview
Dependencies
2
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rygent/spotify

A simple to use API library for the Spotify REST API.


Version published
Maintainers
1
Weekly downloads
7
decreased by-73.08%

Weekly downloads

Readme

Source

Spotify API

A simple to use API library for the Spotify REST API. Only supports searching for track | album | artist however the 2 former ones have not been tested.

What's Different?
  • Uses undici instead.
  • The code base has been completely rewritten to typescript.

Installation

npm i @rygent/spotify
yarn add @rygent/spotify

API

<spotify>.search({ type: 'artist|album|track', query: 'My search query', offset: 0, limit: 20 });
Example
const { Spotify } = require('@rygent/spotify');

const spotify = new Spotify({
    id: 'your client id',
    secret: 'your client secret'
});

// later on ...
await spotify.search({ type: 'track', query: 'I Me Mine' });
await spotify.search({ type: 'album', query: 'Let It Be' });
await spotify.search({ type: 'artist', query: 'The Beatles' });

Note The offset property is optional and the search will default to 0 if one is not supplied.

Note The limit property is optional and the search will default to 20 if one is not supplied.

FAQs

Last updated on 13 Mar 2023

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