
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
quick-spotify-wrapper
Advanced tools
Moved from Chat-and-Share/quick-spotify-wrapper
Full documentation can be found here.
For support you can join my Discord Server.
Example:
const Spotify = require("quick-spotify-wrapper");
const spotify = new Spotify("client id", "client secret");
(async () => {
await spotify.login(); // you must call the login function before you can use any part of the library!
// you can now use the library and make api calls!
})();
The client will handle automatically refreshing the authentication token.
You can check the authentication status with spotify.authenticated
which will return a boolean
Search Example:
(async () => {
await spotify.login();
const results = await spotify
.search("track:counting stars", 1, ["track"])
.catch((error) => console.error(error));
console.log(results);
})();
information related to how to use search can be found here: Spotify API Reference
AN IMPORTANT THING TO UNDERSTAND IS THAT BETWEEN SEED_ARTISTS, SEED_GENRES, AND SEED_TRACKS, YOU CAN ONLY HAVE A MAX OF 5 COMBINED! NOT 5 PER SEED!
Recommendations API can be a bit complex so here are some examples:
Basic:
(async () => {
await spotify.login();
const results = await spotify.browse
.getRecommendations(
["2sf28o6euxEDpYkG9dMtuM", "3bwENxqj9nhaAI3fsAwmv9"],
["pop"],
["6XwnkMuCSCu46Q4BS5nGNL", "4BacK7ZctqLEyFomDuh9jG"]
)
.catch((error) => console.error(error));
console.log(results);
})();
What this does is generates recommendations from artists, genres, and tracks provided. You can provide up to 5 tracks, genres, and artists. this is the most basic example.
Here is a more complex example:
(async () => {
await spotify.login();
const results = await spotify.browse
.getRecommendations(
["2sf28o6euxEDpYkG9dMtuM", "3bwENxqj9nhaAI3fsAwmv9"],
["pop"],
["6XwnkMuCSCu46Q4BS5nGNL", "4BacK7ZctqLEyFomDuh9jG"],
["min_popularity=1", "min_speechiness=0.33"],
["max_popularity=80", "max_speechiness=0.66"]
)
.catch((error) => console.error(error));
console.log(results);
})();
This example generates recommendations with a minimum popularity of 1 and speechiness of 0.33, and a maximum popularity of 80 and speechiness of 0.66
More information on how to use this API can be found here: Spotify API Docs
Spotify api returns error objects in the following form:
{ error: { status: <http resonse code>, message: '<error messages>' } }
Examples:
{ "error": { "status": 404, "message": "No such user" } }
{ "error": { "status": 400, "message": "invalid request" } }
FAQs
A Simple wrapper around the spotify API
We found that quick-spotify-wrapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.