Socket
Socket
Sign inDemoInstall

@drgatoxd/lavasfy

Package Overview
Dependencies
15
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @drgatoxd/lavasfy

lavasfy, pero modificado para uso personal


Version published
Maintainers
1
Created

Readme

Source

npm original: https://npmjs.com/lavasfy cambio de esta version: buscar por isrc en yt music, si no encuentra busca por el nombre, y si no encuentra busca en yt

lavasfy npm

Spotify album, playlist, and track resolver for Lavalink.

Installing

# npm
npm i lavasfy
# yarn
yarn add lavasfy

Example Usage

const { LavasfyClient } = require('lavasfy');
const lavasfy = new LavasfyClient(
	{
		clientID: 'a client id',
		clientSecret: 'a client secret'
	},
	[
		{
			id: 'main',
			host: 'localhost',
			port: 2333,
			password: 'youshallnotpass',
			secure: false
		}
	]
);
(async () => {
	// We need to call this to get the Spotify API access token (only needs once after the LavasfyClient instantiated).
	await lavasfy.requestToken();
	// Select node to use with its id.
	const node = lavasfy.getNode('main');
	// Use Node#load to load album, playlist, and track
	const album = await node.load('https://open.spotify.com/album/4sZni6V6NvVYhfUFGqKuR3');
	console.log(album);
	const playlist = await node.load('https://open.spotify.com/playlist/2NdDBIGHUCu977yW5iKWQY');
	console.log(playlist);
	const track = await node.load('https://open.spotify.com/track/4zsxBgPkUFYEoOGDncGIBd');
	console.log(track);
	// Response object: https://github.com/Allvaa/lava-spotify/blob/master/src/typings/Lavalink/index.ts#L22
})();

Documentation

Keywords

FAQs

Last updated on 16 Jul 2022

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