API Songs

deby edited this page Jan 13, 2017 · 5 revisions

school idol tomodachi

List of features

School Idol Tomodachi Cards

School Idol Tomodachi Profile

School Idol Tomodachi Activities

School Idol Tomodachi Events

School Idol Festival, the game

Contact us

Help us!

Developers

Clone this wiki locally

School Idol API - Songs endpoint

See also: Full API Documentation

Objects

Name Type Example Note
:white_check_mark: name String "トリコリコPLEASE‼︎"
romaji_name String "Torikoriko PLEASE!!"
translated_name Localized string "Please Let Me Capture Your Heart!!" If the language is not en, songs with English names will get a translation here.
attribute Attribute choices "Pure"
main_unit String "Aqours"
BPM Int 140
time Int 103
event String null Will contain a string when the song is from and event, otherwise null. To get the full Event object, use the parameter expand_event (much slower).
rank Int 56 Rank required to unlock this song
daily_rotation String "A"
daily_rotation_position Int 1
image URL "http://i.schoolido.lu/songs/azalea.png"
easy_difficulty Int 2
easy_notes Int 100
normal_difficulty Int 5
normal_notes Int 195
hard_difficulty Int 8
hard_notes Int 331
expert_difficulty Int 9
expert_random_difficulty Int 9
expert_notes Int 439
master_difficulty Int 11
master_notes Int 697
available Boolean true
itunes_id Int 1113388224 See Use itunes ID to play a preview of the songs
website_url URL "http://schoolido.lu/songs/%E3%83%88%E3%83%AA%E3%82%B3%E3%83%AA%E3%82%B3PLEASE%E2%80%BC%EF%B8%8E/"

Methods

Get the list of songs

GET http://schoolido.lu/api/songs/
Response

Paginated array of Song object

Optional parameters for filtering
Name Value Note
search Free search term, break terms with spaces. Will search through name, romaji_name, translated_name (English translation only).
romaji_name Exact value
attribute Exact value
event Exact value Use Japanese name
rank Exact value
daily_rotation Exact value
daily_rotation_position Exact value
is_event True or False
is_daily_rotation True or False
available True or False
Optional parameters to get more data
Name Note
expand_event Will return the full Event object in the event field. Much slower.

Get a song by name

GET http://schoolido.lu/api/songs/{name}/

Japanese name only (name field). To get a song using the romaji name, use the romaji_name filter in Get the list of songs.

Response

Song object

Parameters

See Get the list of songs.

Use itunes ID to play a preview of the songs

If you want to use the itunes_id to allow your users to listen to a preview of the song, you can use the iTunes API.

Here's a simple example using jQuery:

<audio controls="">
  <source src="" type="audio/mp4">
    Your browser does not support the audio element.
</audio>
<br>
<img src="">
<a href="" target="_blank">
  <img src="http://i.schoolido.lu/static/get_itunes.svg" alt="Get it on iTunes">
</a>
var itunes_id = 395194013;
$.ajax({
    "url": 'https://itunes.apple.com/lookup',
    "dataType": "jsonp",
    "data": {
        "id": itunes_id,
        "country": "JP",
    },
    "error": function (jqXHR, textStatus, message) {
        alert('Oops!');
    },
    "success": function (data, textStatus, jqXHR) {
        if (data['results'].length == 0) {
            alert('Oops!');
        } else {
            song = data['results'][0];
            $('img').first().prop('src', song['artworkUrl60']);
            $('a').prop('href', song['trackViewUrl'] + '&at=1001l8e6');
            $('audio source').prop('src', song['previewUrl'])
            $('audio')[0].load();
            $('audio')[0].play();
        }
    }
});

Try it on JSFiddle