All Projects → calluswhatyouwant → spotify-web-sdk

calluswhatyouwant / spotify-web-sdk

Licence: MIT license
A JS SDK for the Spotify Web API.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to spotify-web-sdk

whichone
A personalised Spotify quiz based on the music you listen to
Stars: ✭ 14 (-64.1%)
Mutual labels:  spotify, spotify-web-api
react-spotify-player
Realtime Spotify Player built with React.
Stars: ✭ 126 (+223.08%)
Mutual labels:  spotify, spotify-web-api
spotify-release-list
📅 Display list of Spotify releases from artists you follow
Stars: ✭ 142 (+264.1%)
Mutual labels:  spotify, spotify-web-api
react-redux-spotify
React + Redux + Spotify web api boilerplate project
Stars: ✭ 14 (-64.1%)
Mutual labels:  spotify, spotify-web-api
spotipy2
The next generation Spotify Web API wrapper for Python 3.7+
Stars: ✭ 25 (-35.9%)
Mutual labels:  spotify, spotify-web-api
Exportify
Export/Backup Spotify playlists using the Web API
Stars: ✭ 1,611 (+4030.77%)
Mutual labels:  spotify, spotify-web-api
foo spotify
foobar2000 component for Spotify integration
Stars: ✭ 158 (+305.13%)
Mutual labels:  spotify, spotify-web-api
laravel-spotify
Laravel-Spotify is a simple wrapper around the Spotify Web API that makes working with its endpoints a breeze!
Stars: ✭ 141 (+261.54%)
Mutual labels:  spotify, spotify-web-api
SpotifyWebApi
A .net core wrapper for the Spotify Web API
Stars: ✭ 19 (-51.28%)
Mutual labels:  spotify, spotify-web-api
spotify-playlist-generator-analyzer
Creates a personal playlist based on self chosen preferences.
Stars: ✭ 38 (-2.56%)
Mutual labels:  spotify, spotify-web-api
remixr
Discover new music based on the Spotify playlists you know and love!
Stars: ✭ 37 (-5.13%)
Mutual labels:  spotify, spotify-web-api
personal-dj
Personal DJ site that creates playlists given custom inputs. View it live at: http://personaldj.net/
Stars: ✭ 27 (-30.77%)
Mutual labels:  spotify, spotify-web-api
spotify-true-random
🔀 An application for unbiased truly random playlist and library shuffling with Spotify.
Stars: ✭ 51 (+30.77%)
Mutual labels:  spotify, spotify-web-api
musicritic
Your personal music-specific Metacritic.
Stars: ✭ 45 (+15.38%)
Mutual labels:  spotify, spotify-web-api
MySpotify
A website to view your Spotify stats.
Stars: ✭ 38 (-2.56%)
Mutual labels:  spotify, spotify-web-api
Spotify-Telegram-Bio-Updater
Spotify Telegram Bio Updater Heroku Integration
Stars: ✭ 26 (-33.33%)
Mutual labels:  spotify, spotify-web-api
spotify-vibe-check
Spotify Vibe Checker Web App to vibe check your Spotify Playlists! (currently broken due to CORS)
Stars: ✭ 24 (-38.46%)
Mutual labels:  spotify, spotify-web-api
SpotMusicGen
A Program that creates a Spotify playlist from a YouTube Playlist
Stars: ✭ 47 (+20.51%)
Mutual labels:  spotify, spotify-web-api
tgbiofy
Changes the Telegram bio, profile picture, first and last name to the song that the user is currently listening to.
Stars: ✭ 24 (-38.46%)
Mutual labels:  spotify
fycharts
Unofficial Spotify Charts API. Get any and all data for top 200 and viral 50 music on Spotify. 27th Apr 2021 Update - fycharts returns empty dataframes due to CloudFlare protection on spotifycharts.com
Stars: ✭ 44 (+12.82%)
Mutual labels:  spotify

Spotify Web SDK

A JavaScript SDK for the Spotify Web API. Note that this project is still a BETA version.

Table of Contents

Features

"Why should I use this?"

We want to handle the hard work for you. Even to make simple requests, such as to get information on a track, you'd need to make a bunch of setups. Here is how you could do the same thing with our aid:

import * as spotify from 'spotify-web-sdk';
spotify.init({ token: 'YOUR SPOTIFY TOKEN HERE!' }); // You should only need to run this once.
spotify.getTrack('3LOpHuEpjkL4T1Zcjhko8w'); // Or any other track id.

Yes, it's as simple as that!

"I still think it's no hard work at all. Therefore, I don't see the point in using this."

How rude! As you might have noticed, this is an open source project, which means that you can add or suggest your own features. Of course, don't expect us to ever have a method such as getTaylorSwiftBestTracks pushed into our master branch. (But if you ever thought on something like that, hey, let's be friends!)

What we really mean is: there's a lot of information that can be extracted from the data retrievable via Spotify's Web API. If you think of something that could come in handy for you and also other people, that's it! Don't be shy, make it happen. We'll gladly review your suggestion as soon as possible!

For instance, you can retrieve the duration of a track in milliseconds straight from the API, but know what'd more usual? If you thought "displaying it in minutes", we're on the same page. To do that, adding the following code to our Track model would do the trick:

get formattedDuration() {
    const minutes = Math.floor(this.durationMs / 60000);
    const seconds = Math.floor((this.durationMs % 60000) / 1000);
    return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
}

This is already implemented, but do you get our point? It might be something really simple, but we believe that such little things can save a lot of time in the future.

"You convinced me. Let's go!"

Even though I'm not certain you thought that right now, here's how to get started:

Installation

Using Yarn:

yarn add spotify-web-sdk

Using NPM:

npm install spotify-web-sdk

Using CDN:

<script src="https://unpkg.com/spotify-web-sdk/build/dist/spotify-web-sdk.min.js"></script>

Usage

First of all, you will need a Spotify authorization token. For that, check Spotify Web API's Authorization Guide. Please note that you might need some specific authorization scopes depending on the requests you'll be running.

And then you'll only need to import the function that implements the request you want to make. Remember that you'll need to run the init function passing your authorization token to authorize making the requests. There's an example of the usage at the beginning of this README.

Community

As aforementioned, this project exists because we believe that we can support each other to create a better experience for everyone. You can contribute in many ways. Please, note that we have a Code of Conduct, which we expect to be strictly respected.

Suggest a new feature or report a bug

If you notice any other bugs or you have any ideas to improve our SDK, feel free to create an issue. We'll be more than happy to discuss it! Check our issue templates.

Do it yourself

Check out our CONTRIBUTING file!

Maintainers

@JoseRenan and @JRobsonJr

Hall of Fame

Made with hall-of-fame.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].