# node-spotilocal

> [DEPRECATED] Simple wrapper class for Spotify local webserver.

Latest version **1.0.6** (published 2018-09-15) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install node-spotilocal
pnpm add node-spotilocal
yarn add node-spotilocal
bun add node-spotilocal
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-09-15 |
| First published | 2018-05-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Oliver Findl |
| Maintainers | oliverfindl |
| Keywords | node, spotify, wrapper, spotilocal, node-spotilocal |

## Links

- npm: https://www.npmjs.com/package/node-spotilocal
- Repository: https://github.com/oliverfindl/node-spotilocal
- Homepage: https://github.com/oliverfindl/node-spotilocal#readme
- Issues: https://github.com/oliverfindl/node-spotilocal/issues
- npm.io page: https://npm.io/package/node-spotilocal

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.10

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2018-09-15
- 1.0.5 — 2018-06-02
- 1.0.4 — 2018-05-30
- 1.0.3 — 2018-05-19
- 1.0.2 — 2018-05-17
- 1.0.1 — 2018-05-16
- 1.0.0 — 2018-05-16

## README

# [DEPRECATED] node-spotilocal

[![npm](https://img.shields.io/npm/v/node-spotilocal.svg?style=flat)](https://www.npmjs.com/package/node-spotilocal)
[![npm](https://img.shields.io/npm/dt/node-spotilocal.svg?style=flat)](https://www.npmjs.com/package/node-spotilocal)
[![npm](https://img.shields.io/npm/l/node-spotilocal.svg?style=flat)](https://www.npmjs.com/package/node-spotilocal)
[![paypal](https://img.shields.io/badge/donate-paypal-blue.svg?colorB=0070ba&style=flat)](https://paypal.me/oliverfindl)

Simple wrapper class for [Spotify](https://www.spotify.com/) app local webserver.

---

## Install

Via [npm](https://npmjs.com/) [[package](https://www.npmjs.com/package/node-spotilocal)]:
```bash
$ npm install node-spotilocal
```

Via [yarn](https://yarnpkg.com/en/) [[package](https://yarnpkg.com/en/package/node-spotilocal)]:
```bash
$ yarn add node-spotilocal
```

## Usage

```javascript
// require lib
const Spotilocal = require("node-spotilocal");

// init lib
const spotify = new Spotilocal();

// [optional] get auth tokens from Spotify app or auth process will execute with first request
spotify._auth().then(tokens => {
	// ...
}).catch(console.error);

// play track
spotify.play("spotify:track:1qCQTy0fTXerET4x8VHyr9").then(console.log).catch(console.error);

// pause track
spotify.pause().then(console.log).catch(console.error);

// unpause track
spotify.unpause().then(console.log).catch(console.error);

// get app status on particular events (default: ["login", "logout", "play", "pause", "error", "ap"]) or after X seconds (default: 0; 0 = disabled)
spotify.status(["login", "logout", "play", "pause", "error", "ap"], 0).then(console.log).catch(console.error);

// [optional] revoke auth tokens
spotify._revoke();
```

---

## License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/node-spotilocal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
