百度FM 获取随即歌曲
<p><strong>简要描述:</strong> </p>
<ul>
<li>获取随机歌曲</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://api.jirengu.com/fm/getSong.php</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>参数:</strong>
channel: channel的ID(不填为默认)</p>
<p><strong>使用范例:</strong>
范例1
<code>http://api.jirengu.com/fm/getSong.php?channel=4</code>
<code>http://api.jirengu.com/fm/getSong.php?channel=4&callback=getSong</code>
<code>//https协议,可以在 github pages 上使用</code>
<code>https://jirenguapi.applinzi.com/fm/getSong.php?channel=4</code>
范例2</p>
<pre><code> $.get('http://api.jirengu.com/fm/getSong.php',{channel: 'public_aaa_bbb'})
.done(function(song){
console.log(song)
});</code></pre>
<p><strong>返回示例</strong></p>
<pre><code>{
"song": [
{
"sid": 300525260,
"title": "Love Is a Many-Splendour Thing",
"picture": "http://qukufile2.qianqian.com/data2/pic/ef072007d26467ef02f7c27af3d5e379/300524248/300524248.jpg@s_0,w_300",
"artist": "Mantovani",
"url": "http://zhangmenshiting.qianqian.com/data2/music/791dc834ea12003414c67f907ba9d0a6/300525470/300525470.mp3?xcode=81e45f54436c31b4aca186416cbdae39",
"lrc": ""
}
]
}</code></pre>