0
votes

I'm using the JavaScript SDK for the Soundcloud API and trying to populate the top 10 tracks from authenticated users stream.

Currently I am implementing this with:

SC.get('/tracks', { limit: '10'}, function(tracks) {
   //Do stuff with tracks
});

However, this only returns the most recent 10 tracks/sounds uploaded to SoundCloud. Is there an easy way to populate my stream?

2

2 Answers

1
votes

I was looking for the same thing, but there is no way to get the complete user's stream. You can get the users activities from

https://api.soundcloud.com/me/activities.json

But there are not all songs listed from your stream. I hope the SoundCloud devs will make that thing better in the future.

0
votes

Try to use this code

fetch: function () {
    var self = this;
    SC.get("/tracks", { limit: '10'}, function (data) {
        self.tracks = $.map(data, function (track) {
            return {
                title: track.title
            };
        });
        self.attachTemplate();
    });
}

soundcloud.init({
    template: $('#tracks-template').html(),
    container: $('ul.soundcloud')
});

And show the item title in your HTML page.