Only 50 SoundCloud groups returned by GET

I joined 92 groups in SoundCloud, but when I do SC.get ("/ me / groups" .... etc., I get only 50 back. When I do

curl http://api.soundcloud.com/users/6999000/groups.json?client_id=MY_CLIENT_ID 

Do I get only 50 results returned to me? Any way to get the total number of group entries?

+4
source share
2 answers

There is an offset GET parameter that you can pass to get tracks above 50 points.

 curl http://api.soundcloud.com/users/6999000/groups.json?client_id=YOUR_CLIENT_ID&offset=50 

Hope this helps.

+4
source

You can use loop and offset to get everything.

Pseudo code ...

 String url = "http://api.soundcloud.com/users/6999000/groups.json?client_id=MY_CLIENT_ID"; getGroups(url); int count = 50; String newUrl = "http://api.soundcloud.com/users/6999000/groups.json?client_id=MY_CLIENT_ID&offset=50"; while( count < 92) { getGroups(newUrl); count = count + 50; } 

See http://developers.soundcloud.com/docs#pagination for more information on offsets.

0
source

All Articles