Socket
Socket
Sign inDemoInstall

spotify-web-api-ts-edge

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    spotify-web-api-ts-edge

An isomorphic TypeScript wrapper for Spotify's Web API that can run on the edge


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

spotify-web-api-ts-edge

An isomorphic TypeScript wrapper for Spotify's Web API that can run on the edge
View the docs »

npm minzipped size license


This is a fork from https://github.com/adamgrieger/spotify-web-api-ts


Changes made

  • removed the querystring package in favor of urlSearchParams
  • removed axios in favor of fetch making it possible to run on the edge
  • zero dependencies

Warning

  • I didn't test the fetches involing post, I wouldn't consider this package stable, use it with caution and lock the version when installing

Installation

pnpm

pnpm add spotify-web-api-ts-edge

yarn

yarn add spotify-web-api-ts-edge

npm

npm install spotify-web-api-ts-edge

Basic Example

import { SpotifyWebApi } from 'spotify-web-api-ts';

const spotify = new SpotifyWebApi({ accessToken: '<YOUR_ACCESS_TOKEN_HERE>' });

const { artists } = await spotify.albums.getAlbum('1uzfGk9vxMXfaZ2avqwxod');

console.log(artists.map(artist => artist.name));
// Array [ "Against All Logic" ]

FAQs

Last updated on 15 Jul 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