Socket
Socket
Sign inDemoInstall

ts-spotify-api

Package Overview
Dependencies
53
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ts-spotify-api

Interact with the Spotify API


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

ts-spotify-api

Interact with the Spotify API

Usage

import { Spotify } from 'ts-spotify-api';

// Initialization
const spotify = new Spotify({
    id: '12345678910',
    secret: '10987654321'
});

// Track search
const nggyu = await spotify.trackSearch({ query: 'Never Gonna Give You Up', limit: 1 });
console.log(nggyu.tracks.items[0]);

// Album search
const wyns = await spotify.albumSearch({ query: 'Whenever You Need Somebody', limit: 1 });
console.log(wyns.albums.items[0]);

// Artist search
const ra = await spotify.artistSearch({ query: 'Rick Astley', limit: 1 });
console.log(ra.artists.items[0]);

Keywords

FAQs

Last updated on 29 May 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