soundcloud-node-es6
v0.0.1
Published
A node.js wrapper for the Soundcloud SDK.
Downloads
3
Maintainers
Readme
soundcloud-node-es6
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.