CC-1987 : Automatic upload of recorded shows to Soundcloud
Added fields to preference form for the station's soundcloud user/pass need to generalize file upload as commented out in the new Soundcloud.php file.
This commit is contained in:
parent
10706ec72a
commit
3a0f9ddcd1
5 changed files with 98 additions and 8 deletions
31
application/models/Soundcloud.php
Normal file
31
application/models/Soundcloud.php
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
require_once 'Soundcloud.php';
|
||||
|
||||
|
||||
/*
|
||||
|
||||
require_once 'Soundcloud.php';
|
||||
|
||||
|
||||
$soundcloud = new Services_Soundcloud('2CLCxcSXYzx7QhhPVHN4A', 'pZ7beWmF06epXLHVUP1ufOg2oEnIt9XhE8l8xt0bBs');
|
||||
|
||||
$token = $soundcloud->accessTokenResourceOwner('naomiaro@gmail.com', 'airtime17');
|
||||
|
||||
$track_data = array(
|
||||
'track[sharing]' => 'private',
|
||||
'track[title]' => 'Test',
|
||||
'track[asset_data]' => '@/home/naomi/Music/testoutput.mp3'
|
||||
);
|
||||
|
||||
try {
|
||||
$response = json_decode(
|
||||
$soundcloud->post('tracks', $track_data),
|
||||
true
|
||||
);
|
||||
}
|
||||
catch (Services_Soundcloud_Invalid_Http_Response_Code_Exception $e) {
|
||||
show_error($e->getMessage());
|
||||
}
|
||||
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue