2011-06-13 36 views
4

我正在使用主要soundcloud包裝(https://github.com/mptre/php-soundcloud)嘗試將我的帳戶上的曲目拖到我的網站上。我有整個事情工作很好,但只是通過訪問查詢(我的用戶名已更改,並不是唯一的,所以我需要更改查詢)。所以我需要的就是這個「https://api.soundcloud.com/users/isound604/tracks.json」,如果你檢查API控制檯,你會看到它返回我的曲目。需要使用包裝器從soundcloud API調用簡單請求

我的問題是,我不知道如何使這個請求與包裝。我曾經使用:

$string = $soundcloud->get('tracks', array('q' => 'beatmanshan', 'order' => 'created_at')); 

但新的請求似乎並沒有在該功能。任何人都可以解釋這個問題嗎?請提前謝謝你!讓我知道你是否需要更多信息。

回答

1

您是否已經使用api進行了身份驗證?要檢查

$my_details = json_decode($soundcloud->get('me')); 

應該返回您的賬戶信息

如果是這樣你試圖

$string = $soundcloud->get('users/isound604/tracks', array('order' => 'created_at'));