lunify.js
Version:
A basic api wrapper for the spotify api covering the oauth routes.
26 lines (25 loc) • 815 B
TypeScript
import { Lunify } from '../..';
import { Player } from '.';
import { PlayerDevice } from './Device';
export declare class PlayerDeviceManager {
client: Lunify;
private player;
constructor(client: Lunify, player: Player);
/**
* Fetch all available devices for the user and current playback
* @example ```ts
* await player.devices.fetch();
* ```
*/
fetch(): Promise<PlayerDevice[]>;
/**
* Transfer the current playback to provided device
* @param {string | string[]} device - id of the playback device
* @example ```ts
* const devices = await player.devices.fetch();
* const deviceId = devices[0].id;
* player.devices.transferPlaybackTo(deviceId);
* ```
*/
transferPlaybackTo(device: string | string[]): Promise<boolean>;
}