URL | http://ir.owatatsu.pasta-soft.com/api.php |
---|---|
メソッド | GET |
パラメータ | hcode:取得したいデータの譜面コードをカンマ区切りで記述 |
返り値 | JSONP 各データは最大5件 |
URL:http://ir.owatatsu.pasta-soft.com/api.php?hcode=1066624,1749592,2637762,2299526
返り値:callback([ [ { "date": "2012-11-11 22:01:51", "score": "366720", "username": "ruuu" }, { "date": "2012-11-25 13:46:50", "score": "366400", "username": "IRON" }, { "date": "2012-12-03 21:27:57", "score": "365780", "username": "443187" }, { "date": "2012-11-07 21:35:55", "score": "357970", "username": "arashi" }, { "date": "2012-12-27 20:42:42", "score": "357880", "username": "sora_ku" } ], [ { "date": "2012-11-11 18:04:35", "score": "600340", "username": "443187" }, { "date": "2012-12-02 12:56:22", "score": "599050", "username": "ruuu" }, { "date": "2012-11-27 09:59:08", "score": "596520", "username": "asubel" }, { "date": "2013-02-12 17:52:12", "score": "593440", "username": "ichiro" }, { "date": "2012-11-24 21:48:18", "score": "593200", "username": "IRON" } ], [ { "date": "2012-12-03 21:31:38", "score": "880980", "username": "443187" }, { "date": "2012-11-08 18:38:51", "score": "878420", "username": "rurika" }, { "date": "2012-11-09 20:21:01", "score": "878010", "username": "frontline" }, { "date": "2012-12-19 10:42:22", "score": "876570", "username": "mukamasa" }, { "date": "2012-12-01 15:14:31", "score": "872660", "username": "nhnhnh" } ], [ { "date": "2012-11-07 17:16:26", "score": "1109660", "username": "motipan" }, { "date": "2012-11-07 19:33:41", "score": "1109190", "username": "Mugetsu" }, { "date": "2012-11-09 20:07:51", "score": "1109190", "username": "konene" }, { "date": "2012-12-18 21:08:03", "score": "1109190", "username": "orange123" }, { "date": "2012-11-29 13:06:58", "score": "1108050", "username": "pieiru" } ] ])
<h2>ランキング</h2> <h3>かんたん</h3><div id="ranking0"></div> <h3>ふつう</h3><div id="ranking1"></div> <h3>むずかしい</h3><div id="ranking2"></div> <h3>おに</h3><div id="ranking3"></div> <script> function callback(data){ for(var j=0;j<data.length;j++){ var elm = document.getElementById("ranking" + j); for(var i=0;i<data[j].length;i++){ elm.innerHTML += "<b>" + (i+1) + "位</b> " + data[j][i].username + " " + data[j][i].score + "点 " + data[j][i].date + "<br>"; } } } </script> <script src="http://ir.owatatsu.pasta-soft.com/api.php?hcode=1066624,1749592,2637762,2299526"></script>