Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SOUNDCLOUDAPI = require('soundcloud-nodejs-api-wrapper');
- var JACCESS = require('jsonfile');
- var SCcredentials = {
- client_id : 'a1bba234127704809008652469007c47', // Soundcloud app client id
- client_secret : '6eead97a7561d9b609a4df0b2bdef82e', // SoundCloud app secret
- username : 'ronkrt.mobile@gmail.com', // SoundCloud Username
- password : '' // Soundcloud Password
- };
- var SCconfig = {
- gSections : [
- 'comments', // Get Profile Comments for user (prase for tipping)
- 'followers', // Get Follower information (User IDS)
- 'tracks' // Get Track Information (Track IDS)
- ],
- gInfo : [
- '14859705', // SoundPosition
- '4182848', // Rouviere
- '83205644' // thecypherfunks
- ]
- };
- var SOUNDCLOUDAPIC = new SOUNDCLOUDAPI(SCcredentials);
- var SCCLIENT = SOUNDCLOUDAPIC.client();
- SCCLIENT.exchange_token(function(err, result) {
- var SCACCESSTOKEN = arguments[3].access_token;
- console.log('Full API auth response was:');
- console.log(arguments);
- var SCCNEW = SOUNDCLOUDAPIC.client({access_token : SCACCESSTOKEN});
- for (i = 0; i < SCconfig.gSections.length; i++) {
- // Add code
- console.log(SCconfig.gSections[i]);
- }
- for (i = 0; i < SCconfig.gInfo.length; i++) {
- // Add code
- console.log(SCconfig.gInfo[i]);
- }
- SCconfig.gSections.forEach(function (item) {
- // Add code
- });
- SCCNEW.get('/users/14859705/comments', {limit : 10000000}, function(err, result) {
- if (err) console.error(err); // check for an error
- var file = './14859705-profile-comments.json' // create a profile comments json file
- JACCESS.writeFileSync(file, result, {spaces: 2}) // Write the file to disk with json Spacing of 2
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement