# ts-spotify-api

> Interact with the Spotify API

Latest version **1.1.1** (published 2022-05-29) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install ts-spotify-api
pnpm add ts-spotify-api
yarn add ts-spotify-api
bun add ts-spotify-api
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-05-29 |
| First published | 2022-05-29 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Zemyoro |
| Maintainers | zemyoro |
| Keywords | spotify, spotify-api |

## Links

- npm: https://www.npmjs.com/package/ts-spotify-api
- npm.io page: https://npm.io/package/ts-spotify-api

## Dependencies (3)

- [request](https://npm.io/package/request.md) ^2.88.2
- [typescript](https://npm.io/package/typescript.md) ^4.7.2
- [@types/request](https://npm.io/package/@types/request.md) ^2.48.8

## Recent versions

- 1.1.1 (latest) — 2022-05-29
- 1.1.0 — 2022-05-29
- 1.0.9 — 2022-05-29
- 1.0.8 — 2022-05-29
- 1.0.7 — 2022-05-29
- 1.0.6 — 2022-05-29
- 1.0.5 — 2022-05-29
- 1.0.4 — 2022-05-29
- 1.0.3 — 2022-05-29
- 1.0.2 — 2022-05-29
- 1.0.1 — 2022-05-29
- 1.0.0 — 2022-05-29

## README

# ts-spotify-api
 Interact with the Spotify API

## Usage
```typescript
import { Spotify } from 'ts-spotify-api';

// Initialization
const spotify = new Spotify({
    id: '12345678910',
    secret: '10987654321'
});

// Track search
const nggyu = await spotify.trackSearch({ query: 'Never Gonna Give You Up', limit: 1 });
console.log(nggyu.tracks.items[0]);

// Album search
const wyns = await spotify.albumSearch({ query: 'Whenever You Need Somebody', limit: 1 });
console.log(wyns.albums.items[0]);

// Artist search
const ra = await spotify.artistSearch({ query: 'Rick Astley', limit: 1 });
console.log(ra.artists.items[0]);
```

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