Rameses B
CloZee (商用不可のものも多い)
breakzlinkz
killthenoise
<html>
<head>
<script src="http://connect.soundcloud.com/sdk.js"></script>
<script type="application/x-javascript">
var trackList =[
//パスは 曲の個別ページの Share ボタンの Wiget コードなどから取得できる。
"/tracks/23445579",
"/tracks/55141652",
"/tracks/24035137",
"/tracks/56710548",
"/tracks/71417118",
"/tracks/22491458"
];
function init(){
SC.initialize({
client_id: "Client_ID",
redirect_uri: "http://example.com/callback.html"});
playNext();
};
function setTrackInfo(trackurl){//トラックの情報を取得する。CC ライセンスでは、作者名表示が必要な場合が多いため。
//また、作者がライセンスを変更した時のために license をチェックしてプレイするかどうかを決めるべき。
SC.get(trackurl, {limit: 1}, function(t){
console.log(t.title);
console.log(t.permalink_url);
console.log(t.license);
console.log(t.artwork_url);
console.log(t.user.username);
console.log(t.user.permalink_url);
document.getElementById("trackinfodiv").innerHTML = "Music : <a href='"+t.permalink_url+"'>" + t.title+" by "+t.user.username+"</a>";
});
}
function playNext(){
var nextSound = trackList.shift();
playSound(nextSound);
setTrackInfo(nextSound);
};
function playSound(trackurl){
SC.stream(trackurl,function(sound){//ここは SoundManager2 の領分なので、SoundManager2 の API を参照のこと。
sound.play({
volume:50,
onsuspend: function() {
playNext();
},
onload: function() {
if(sound.readyState == 2){//曲が消えていた場合は 2 が返ってくるので次の曲に移る。
playNext();
}
},
onfinish: function() {//曲が終わったら次の曲を流す。
playNext();
}
});
});
};
</script>
</head>
<body onload="init()" style="overflow:hidden;">
<a href="https://soundcloud.com/"><img alt="soundcloud logo icon"></a>API の使用には SoundCloud のロゴとリンクが必要なのでダウンロードして貼り付けること。
<div id="trackinfodiv">
</div>
</body>
</html>
use Net::Twitter::Lite::WithAPIv1_1;
use utf8;
use strict;
use warnings;
use Net::Twitter::Lite::WithAPIv1_1;
use URI::Escape;
my $consumer_key = '';
my $consumer_secret = '';
my $token = '';
my $token_secret = '';
my $nt = Net::Twitter::Lite->new(
consumer_key => $consumer_key,
consumer_secret => $consumer_secret,
apiurl => 'https://api.twitter.com/1.1',
legacy_lists_api => 0
);
$nt->access_token($token);
$nt->access_token_secret($token_secret);
my $res;
my $targetquery = "http://www.yahoo.co.jp";
$res = $nt->search({q=>$targetquery,count => 100, lang => 'ja'});
# print response
my %hs = %{$res};
foreach my $kk(keys %hs){
print $kk."\t".$hs{$kk}."\n";
}
my @search_res = @{$hs{'results'}};
foreach my $rr(@search_res){
print $rr."\n";
foreach my $kkk(keys %{$rr}){
if(defined ${$rr}{$kkk}){
print $kkk."\t".${$rr}{$kkk}."\n";
}
}
}
| 日 | 月 | 火 | 水 | 木 | 金 | 土 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |