soundcloud-node-es6

0.0.1 • Public • Published

soundcloud-node-es6

dependencies status dev-dependencies status Build Status Coverage Status npm version

A node.js wrapper for the Soundcloud SDK. Inspired by the library node-soundcloud.

WARNING

This module is still in development. Only the client id is used, the secret id is ignored (so, you can get only public information).

I have to implement the Redirect URI and the OAuth Token.

Getting started

npm install soundcloud-node-es6
const SC = require('soundcloud-node-es6');
 
// Initialize the client
SC.init({
    id: 'YOUR_CLIENT_ID',
    secret: 'YOUR_SECRET_ID'
});
 
// To get informations about a track
SC.get('/tracks/245743948').then((result) => {
    console.log(result);
}).catch((error) => {
    console.log(error);
});
 
// To search a track
SC.get('/tracks', {
    q: 'Desiigner - Panda',
}).then((result) => {
    for (const track of result) {
        console.log(track);
    }
}).catch((error) => {
    console.log(error);
});
 
// You can also use other method
SC.post(...);
SC.put(...);
SC.delete(...);

Unit testing

# To launch the test 
npm test
 
# To see the code coverage 
npm run cover

You have to create a file named config.json in the test folder.

{
  "id": "YOUR_CLIENT_ID",
  "secret": "YOUR_SECRET_ID"
}

Contributing

Don't hesitate to create a pull request to improve the project.

Bugs

If you find a bug or want a new feature, dont'hesitate to create an issue.

License

MIT

Package Sidebar

Install

npm i soundcloud-node-es6

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • lludol