Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eddiezane/spot-track
https://github.com/eddiezane/spot-track
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/eddiezane/spot-track
- Owner: eddiezane
- License: mit
- Created: 2015-11-04T16:57:10.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2021-02-15T22:04:39.000Z (almost 4 years ago)
- Last Synced: 2024-11-13T21:46:44.495Z (about 1 month ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spot-track
A simple library to be used in demos. Grabs the preview url from Spotify's search API endpoint for a given track name.
## Usage
```bash
npm install spot-track
``````javascript
const SpotTrack = require('spot-track')const s = new SpotTrack('YOUR_SPOTIFY_CLIENT_ID', 'YOUR_SPOTIFY_CLIENT_SECRET')
async function main() {
try {
const track = await s.getTrack('never gonna give')
console.log(track)
} catch (err) {
console.error(err)
}
}main()
```