Retrieving the "recommended" playlist via API call? - soundcloud

for any given song, e.g.
https://soundcloud.com/shesthequeen/i-dont-wanna-know
SoundCloud has a "recommended" playlist that usually start playing after that song is finished:
https://soundcloud.com/shesthequeen/i-dont-wanna-know/recommended
How can I retrieve this "recommended" playlist via the SoundCloud API? Is there a way? Which connector should I use? I'd like to avoid scraping HTML.
Thanks in advance,
Mary

Looks like that this will be a new subresource of the upcoming tracks endpoint in the next API version.
GET /tracks/{id}/related
These are the API calls:
https://api-v2.soundcloud.com/tracks/102113299/related?anon_user_id=36331428&limit=10&offset=0&linked_partitioning=1
https://api-v2.soundcloud.com/tracks/102113299/related

Related

Volumio - Play specific track via REST API

Using the REST API -https://volumio.github.io/docs/API/REST_API.html
Is there a method to play a specific track?
eg .
volumio.local/api/v1/commands/?cmd=playplaylist&name=Rock
But use a track name instead of a playlist.

How to get live video id from YouTube channel

YouTube API eventType=live not working, does anyone have an idea why?
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCmyKnNRH0wH-r8I-ceP-dsg&eventType=live&type=video&key=
Without eventType was working fine (but not now):
https://www.youtube.com/embed/live_stream?channel=UCmyKnNRH0wH-r8I-ceP-dsg&autoplay=1
Looks like YouTube changed something in API, search.list really not returning live broadcast since end of last week.
If you have user's access token you can use https://www.googleapis.com/youtube/v3/liveBroadcasts?part=snippet&broadcastStatus=active&broadcastType=all
endpoint to retrieve if any broadcast is live.
If you do not have user's access token, you can try this answer
but i didn't check it if it is working
Anyway this question looks like to be a duplicate of this question
Right now the YouTube API is not working, specifically for retrieving live streams of a specific channelId. In other words if you are setting channelId in the API call, you will get 0 results.
If you're using an API key rather than OAuth (not sure if OAuth works) the only work around at the moment is to use the API to search for a specific title. Here is my query URL below.
https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&type=video&maxResults=20&order=date&q=My+Uniquely+Titled+Livestream&key=[apiKey]
The results returned by the API will be from all of YouTube. (Note: the rest is done serverside) Put the results into an array and discard any that don't match your channelId. Then check the titles in an array and only get the video ID of the one that matches your desired title. That is the basic logic and it is sort of a rigid work around that won't work for most. But at least it will get you what you need until Google fixes the API.

User specific tracks search using soundcloud api

Is there a way to make user specific track search using the soundcloud api? This is a sample api call url that returns various track results from other all of soundcloud, which is not the desired result.
https://api.soundcloud.com/users/CLIENT_USER_NAME/tracks?q=SEARCH_TERM&client_id=CLIENT_ID
You can use SC.get to return all of a particular user's tracks, e.g.
SC.get('/users/id/tracks', function(tracks){
// Do stuff
});
http://developers.soundcloud.com/docs/api/reference#users
To get the user id, you can use resolve:
http://developers.soundcloud.com/docs/api/reference#resolve
No you cannot search a specific user's tracks. The documentation is wrong in this case.

Order by playbacks when fetching tracks from SoundCloud

I am fetching a list of tracks from soundcloud's API using the following query to retrieve the 5 most popular tracks:
https://api.soundcloud.com/tracks?client_id=XXX&order=hotness&limit=5
But recently SoundCloud removed the hotness order. In the blog post they say tracks can instead be sorted by playback_count. But can this be done in the query or do they suggest I pull down the whole SoundCloud library and order them in the client? The following doesn't seem to work:
https://api.soundcloud.com/tracks?client_id=XXX&order=playback_count&limit=5
So how would one retrieve the top tracks on SoundCloud?
The solution was to use the undocumented calls for the explorer feature that SoundCloud itself uses (I used the dev tools in Chrome to check the AJAX calls).
https://api.soundcloud.com/explore/sounds/category?limit=L&client_id=XXX
This appears to use some sort of sorting on the popularity of the songs. The songs can then be filtered on only music by checking the "grouping" attribute. I then have to resolve the list of IDs to actual songs which can be done with the (documented, official) API call:
https://api.soundcloud.com/tracks?ids=1,2,3&client_id=XXX
This seems to work perfectly and I also get the added benefit of an even distribution among genres. But of course, this can stop working at any moment since the API calls are undocumented and perhaps not meant for public use.
Just wanted to provide an update. It seems soundcloud has moved to v2 of the explore API call.
Use this to get a list of categories:
https://api.soundcloud.com/explore/v2
And this to get tracks from a category:
https://api-v2.soundcloud.com/explore/metal?limit=10&offset=0
So far it seems to without a key, although I have no idea how long that will last.
EDIT: So the 2nd url doesn't seem to allow cross-origin, but so far this does work, though it only returns the trackID not the full information
https://api.soundcloud.com/explore/v2/metal?limit=50&consumer_key=XXX
check here, soundcloud removed order by hotness.
Has order by hotness been removed from Soundclouds API
so, for now, only order by date is possible.

How to implement RETWEET in ios 5?

I'm working on a project to integrate twitter with my iPhone app, and for now post tweet functionality has been achieved (big thanks to twitter frame work in ios 5), and I want to proceed to RE TWEET function, any help would be appreciated.
P.S-Thanks in advance :)
Issue a POST request to https://api.twitter.com/1/statuses/retweet/12354.json from TWRequest (see https://dev.twitter.com/docs/api/1/post/statuses/retweet/:id for documentation on retweeting via the API). (replace the 12345 with the ID of the tweet the user is retweeting)
See https://dev.twitter.com/docs/ios/making-api-requests-twrequest for more information on issuing REST API requests via TWRequest.
Add current date and time with re twitting message, another wise twitter does not receive same message again.