# spotify-local-control

> Control a local spotify client via spotify-webhelper

Latest version **1.1.1** (published 2017-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install spotify-local-control
pnpm add spotify-local-control
yarn add spotify-local-control
bun add spotify-local-control
```

Provides the command `spotify-local-control`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2017-09-27 |
| First published | 2016-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fabian Mersch |
| Maintainers | f-mer |
| Keywords | spotify, local, control, api, http, client |

## Links

- npm: https://www.npmjs.com/package/spotify-local-control
- Repository: https://github.com/f-mer/spotify-local-control
- Homepage: https://github.com/f-mer/spotify-local-control#readme
- Issues: https://github.com/f-mer/spotify-local-control/issues
- npm.io page: https://npm.io/package/spotify-local-control

## Dependencies (3)

- [get-stream](https://npm.io/package/get-stream.md) ^2.3.1
- [portscanner](https://npm.io/package/portscanner.md) ^2.1.1
- [url-parse-lax](https://npm.io/package/url-parse-lax.md) ^1.0.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2017-09-27
- 1.1.0 — 2017-05-10
- 1.0.2 — 2017-05-10
- 1.0.1 — 2017-01-25
- 1.0.0 — 2016-10-23

## README

# spotify-local-control [![stability][0]][1]
[![npm version][2]][3] [![downloads][4]][5] [![js-standard-style][6]][7]

## Usage
```js
var connect = require('spotify-local-control')
var client = connect()

client.play('spotify:track:0JhKJg5ejeQ8jq89UQtnw8')
client.pause()
client.resume()
client.status().then(res => console.log(res))
```

Can also be used on the command line:

```
$ spotify-local-control

  Usage:
      $ spotify-local-control <command>

    Commands:
      <default>    Show usage
      play <uri>   Play a track
      status       Show artist and track
      pause        Pause the current track
      resume       Resume the current track

    Examples:
      $ spotify-local-control play spotify:track:0JhKJg5ejeQ8jq89UQtnw8
```

## API
### client = connect()
Initialize a new client.

### client.play(spotifyUri, spotifyContext?)
Plays the given song by [spotifyUri].
[spotifyContext] can be specified to display a
related song, playlist, album or artist.

### client.pause()
Pauses the playback.

### client.resume()
Resumes the playback.

### client.status(returnOn?, returnAfter?)
Get status information about the local client.

## Installation
```sh
$ npm install spotify-local-control
```

## See Also
- [spotify-find](https://github.com/f-mer/spotify-find) - get spotify catalog information

## License
[MIT](https://tldrlegal.com/license/mit-license)

[spotifyUri]: https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids
[spotifyContext]: https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids

[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/spotify-local-control.svg?style=flat-square
[3]: https://npmjs.org/package/spotify-local-control
[4]: http://img.shields.io/npm/dm/spotify-local-control.svg?style=flat-square
[5]: https://npmjs.org/package/spotify-local-control
[6]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[7]: https://github.com/feross/standard

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