1.3.5 • Published 2 years ago

@drgatoxd/lavasfy v1.3.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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

1.3.5

2 years ago

1.3.2-test

2 years ago

1.3.2

2 years ago

1.3.3-test

2 years ago

1.3.4-test

2 years ago

1.2.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago