查找soundcloud轨道的API代码



是否有一种快速的方法来获取音轨或播放列表的api url ?

,例如这个播放列表的API链接:

https://soundcloud.com/thump/sets/thump-x-avolta-5

:

https%3A//api.soundcloud.com/playlists/40626677

和此轨道的API链接:

https://soundcloud.com/larryfisherman/the-star-room-og-version

:

https%3A//api.soundcloud.com/tracks/154949628

我要做的是:

这是我有一个vimeo链接的代码。

if($tvideo === "Vimeo"){
        $Vimeo = "html('<iframe src="//player.vimeo.com/video/" . $video . "?color=bc2122" width="700" height="525" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>');";
}

在一个表单中,我有$tvideo(视频类型)。

$video来自url的代码,例如:

https://vimeo.com/83528019

数量:

83528019

我想用soundcloud做同样的事情,但嵌入的html是非常奇怪的†所以不是找到数字(对于vimeo的情况),我需要找到api的url。

__:

html('<iframe width="720" height="500" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/150885898&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>');

http://developers.soundcloud.com/docs/api/reference#resolve会帮忙吗?

$ curl -v 'http://api.soundcloud.com/resolve.json?url=http://soundcloud.com/matas/hobnotropic&client_id=YOUR_CLIENT_ID'

& lt;HTTP/1.1 302临时移动& lt;地点:http://api.soundcloud.com/tracks/49931.json

最新更新