Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/misterhat/mp3skull
Search and stream MP3s from mp3skull.
https://github.com/misterhat/mp3skull
Last synced: 1 day ago
JSON representation
Search and stream MP3s from mp3skull.
- Host: GitHub
- URL: https://github.com/misterhat/mp3skull
- Owner: misterhat
- Created: 2014-12-09T21:52:53.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-19T21:38:13.000Z (over 8 years ago)
- Last Synced: 2024-10-07T08:11:08.294Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mp3skull
Search and stream music from mp3skull.## Installation
$ npm install mp3skull
## Example
```javascript
var fs = require('fs'),
mp3skull = require('mp3skull');mp3skull('the beatles hello goodbye', function (err, tracks) {
tracks[0].song.pipe(fs.createWriteStream('hello goodbye.mp3'));
});
```## API
### track
```javascript
{
track: String, // the track name as it appears on the website
direct: String, // the direct MP3 url to the track
song: ReadableStream, // a lazy readable stream of direct
duration: Number?, // the duration of the track in seconds
bitrate: Number?, // the bitrate of the track in kbps
size: Number? // the size of the track in bytes
}
```*Note that the fields marked with ? suffixed may be undefined for certain tracks.*
### mp3skull(terms, [options], done)
Search MP3 tracks on mp3skull.`terms` is expected to be a string of terms to search for.
`options` is an optional object that's passed into the *needle* requests.
`done` returns an array of `tracks`.
## License
MIT