spotify-web-api-ts-edge
TypeScript icon, indicating that this package has built-in type declarations

0.9.7 • Public • Published

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" ]

Readme

Keywords

none

Package Sidebar

Install

npm i spotify-web-api-ts-edge

Weekly Downloads

1

Version

0.9.7

License

MIT

Unpacked Size

304 kB

Total Files

151

Last publish

Collaborators

  • ygorperez