New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

enhanced-spotify-api

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enhanced-spotify-api

Object-oriented library to work with Spotify's API. Includes wrapper for regular endpoints and additional functionality and grouping of requests.

  • 1.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

Object-Oriented Spotify API Wrapper with Extended Functionality.

Overview

enhanced-spotify-api is an Object-Oriented API Wrapper aimed to make Spotify's API development fun and painless.

Spend more of your time coding something cool, and less time scouring over documentation.

Table of Contents

Official Website / Documentation

Features

Object oriented wrapper with classes for tracks, artists, playlists, and more

  • Member functions for all relevant endpoints
  • Automatic retrieval of data when needed
  • Minimizing requests made

Providing all the original functionality of spotify-web-api-node.

  • Added missing endpoints for shows and episodes (Just released 3/2020)
  • Fixed known bugs

Add and Override methods

  • Customize to your hearts content
  • I don't know what you need it for, so do your thing my dude.

Quick Start

Via command line

$ npm i enhanced-spotify-api

Import either the entire library

var EnhancedSpotifyAPI = require('enhanced-spotify-api');
EnhancedSpotifyAPI.setAccessToken( myAccessToken );

Or deconstruct what you need

var { Track } = require('enhanced-spotify-api');
Track.setAccessToken( myAccessToken );

All classes have the same authorization methods.

Applying a Spotify access token to one class will authorize the entire library and will not need to be called again.

Instantiate and play!

var playlistID = '6Ibg2aBUp5NP0lAujEGa6p';
var playlist = new Playlist( playlistID );

var tracks = playlist.getTracks();
tracks.play();

var size = playlist.size();

See the official website for more information.

Example

var { Track } = require('enhanced-spotify-api');
Track.setAccessToken( myAccessToken );

var trackID = '3HKpZgez8S4TS2F0sWLvAR';
var track = new Track( trackID );

console.log('My favorite song is', ( await track.getFullObject() ).name);

track.play();

var artists = track.getArtists();

var artist = artists.get(0);

var topTracks = artist.getTopTracks();

Available Classes

Instance and static methods for all endpoints relevent to each item

  • Track
  • Artist
  • Album
  • Playlist
  • Show
  • Episode
  • User
  • Playback
  • Tracks
  • Artists
  • Albums
  • Playlists
  • Shows
  • Episodes
  • Categories

Hope you make some cool stuff!

Keywords

FAQs

Package last updated on 23 Jan 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc