-
Notifications
You must be signed in to change notification settings - Fork 18
Sandbox API Methods
Tim Case edited this page Sep 1, 2013
·
8 revisions
Lists detailed information about each asset in the sandbox. This method describes each asset in detail but does not provide direct access to the assets. This method does not require an approved API key. Note that different sandboxes may return different sets of data and metadata.
Echowrap.sandbox_list(:sandbox => 'emi_gorillaz', :results => 3) =>
<Echowrap::Sandbox:0x007fc3233052a8
@attrs={:status=>{:version=>"4.2", :code=>0, :message=>"Success"},
:start=>0, :total=>1864,
:assets=>[{:echonest_ids=>[{:foreign_id=>"emi_artists:track:EUEDD03040157",
:id=>"TRLSIAL1334BAE7AFD"}], :title=>"De-Punked", :filename=>"emi_gorillaz/EUEDD03040157.mp3",
:release=>"Laika Come Home", :type=>"audio", :id=>"3ccc5c9f074ae17704bcb8bc6e3411e5"},
{:"asset type"=>"video", :copyright=>"Parlophone",
:format=>"wmv-streaming",
:title=>"Gorillaz (Live Performance)", :filename=>"emi_gorillaz/EVN2427-wmv-streaming.wmv",
:type=>"video", :id=>"fc3cf230dd46268b9fe7c53fe0e9f1ea"}, {:"asset type"=>"video",
:copyright=>"EMI Music", :format=>"mov-low",
:title=>"Plastic Beach Sundeck Teaser (Advert)", :filename=>"emi_gorillaz/EVN18188-mov-low.mov",
:release=>"Plastic Beach Sundeck Teaser", :type=>"video",
:id=>"f394bce34ddccfe256ee9b78f1b4ed78"}]}>
Gets access to the listed assets. This method returns a secure token or URL that can be used by the application to access the asset. This method requires an API key that has been approved for the sandbox.
Echowrap.sandbox_access(:sandbox => 'emi_gorillaz', :id => 'a0ce7e489bb28be4842b81d444d6bd0f') =>
[<Echowrap::Asset:0x007fe691ad7328
@attrs={:url=>
"http://assets-cdn.echonest.com/emi_gorillaz/EMIDD1267687.mp3?Expires=1375660530&Signature=hTzS685vi9
sP3xfXAfsr83Ls4qXY7J0tBPhS7NLbL7VrliQYbnmnk1yKS7-Qk7nPogdsaf~1f3yYRUTmSu9EOOo7PN~XmPbKVdsuQqgwwGW
tVB220YPlFjJvTRJRAAhreyvnA7kIaVGnE7Murk4nJ0aT24IOmsxRWLCtmpsust4_&Key-Pair-Id=APKAI7GSQ2RBQERQWBOA",
:id=>"a0ce7e489bb28be4842b81d444d6bd0f"}>]