
Security News
pnpm 10.16 Adds New Setting for Delayed Dependency Updates
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
This is a client for the Spotify API that allows searching for artists, albums, tracks, and retrieving information about categories, playlists, and more.
Before starting, make sure you have Node.js installed. Then, clone the repository and install dependencies:
npm install
To use the client, you need to obtain Spotify API credentials from the Spotify Developer Dashboard.
Example configuration:
const Client = require("spotifind");
const spotify = new Client({
consumer: {
key: "YOUR_CLIENT_ID",
secret: "YOUR_CLIENT_SECRET"
}
});
fetch(path, params)
Makes an HTTP request to a Spotify endpoint.
path
(string): The endpoint path.params
(Object, optional): Query parameters.spotify.fetch(spotify.endpoints.search, { q: "Coldplay", type: "artist" })
.then(console.log)
.catch(console.error);
search(params, callback)
Searches for artists, albums, and tracks on Spotify.
params
(Object):
q
(string, required): Search query.type
(string, optional, default "artist,album,track"
): Search type.limit
(number, optional, default 20
): Number of results.callback
(Function, optional): Callback function.spotify.search({ q: "Daft Punk", type: "artist" })
.then(console.log)
.catch(console.error);
getAlbum(id, opts, callback)
Retrieves information about an album or playlist.
id
(string): Spotify ID of the album or playlist.opts
(Object, optional):
tracks
(boolean): If true
, retrieves only the tracks.callback
(Function, optional): Callback function.spotify.getAlbum("3T4tUhGYeRNVUGevb0wThu")
.then(console.log)
.catch(console.error);
getAlbums(array_ids, callback)
Retrieves multiple albums by their Spotify IDs.
array_ids
(Array): List of album IDs.callback
(Function, optional): Callback function.spotify.getAlbums(["3T4tUhGYeRNVUGevb0wThu", "1ATL5GLyefJaxhQzSPVrLX"])
.then(console.log)
.catch(console.error);
FAQs
Cliente para la API de Spotify
The npm package spotifind receives a total of 3 weekly downloads. As such, spotifind popularity was classified as not popular.
We found that spotifind demonstrated a healthy version release cadence and project activity because the last version was released less than 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
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.