我正在使用声音云 javascript api 创建一个应用程序。我在做什么从
http://api.soundcloud.com/resolve.json?url=http://soundcloud.com/matas/hobnotropic&client_id=YOUR_CLIENT_ID
这工作得很好,也返回了所需的东西,但我想如何向返回的 json 输出添加一个新变量。
目前输出如下所示
{"kind":"track","id":49931,"created_at":"2008/10/27 09:56:47 +0000","user_id":1433,"duration":489138,"commentable":true,"state":"finished","original_content_size":130032044,"sharing":"public","tag_list":"dub minimalist hypnotic flanger","permalink":"hobnotropic","streamable":true,"embeddable_by":"all","downloadable":false,"purchase_url":"https://soundcloud.com/matas","label_id":null,"purchase_title":"Get more tracks!","genre":"dub","title":"Hobnotropic","description":"Kinda of an experiment in search for my own sound. I've produced this track from 2 loops I've made using Hobnox Audiotool ( http://www.hobnox.com/audiotool.1046.en.html ). Imported into Ableton LIve! and tweaked some FX afterwards.","label_name":"","release":"","track_type":"original","key_signature":"","isrc":"","video_url":null,"bpm":84.0,"release_year":null,"release_month":null,"release_day":null,"original_format":"wav","license":"cc-by-nc","uri":"http://api.soundcloud.com/tracks/49931","user":{"id":1433,"kind":"user","permalink":"matas","username":"matas","uri":"http://api.soundcloud.com/users/1433","permalink_url":"http://soundcloud.com/matas","avatar_url":"http://i1.sndcdn.com/avatars-000001548772-zay6dy-large.jpg?16b9957"},"permalink_url":"http://soundcloud.com/matas/hobnotropic","artwork_url":"http://i1.sndcdn.com/artworks-000000103093-941e7e-large.jpg?16b9957","waveform_url":"http://w1.sndcdn.com/IqSLUxN7arjs_m.png","stream_url":"http://api.soundcloud.com/tracks/49931/stream","playback_count":74836,"download_count":280,"favoritings_count":25,"comment_count":23,"attachments_uri":"http://api.soundcloud.com/tracks/49931/attachments"}
我想要的只是添加一个变量"custom_url":"http://example.com/example123"
所以任何人都可以指导我有没有可能的方法来做到这一点。我想知道我是否可以将变量传递给soundcloud,soundcloud会自动将变量附加到响应中。