This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PUT to http://host:9200/shares/share/1370441011073780507 | |
| content: | |
| { | |
| "artist": "Black Sabbath", | |
| "id": "1370441011073780507", | |
| "lyrics": "", | |
| "song_title": "Am I Going Insane", | |
| "media_url": "http://s3.amazonaws.com/images.tunewiki.com/shares/mobile/large/75475a5f15a0d9be76bf6822139119c0.jpg", | |
| "has_lyric_art": true, | |
| "has_comment": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| File.open('foo_sorted_reduced.tab', 'w:UTF-8') { |f| | |
| File.open('foo_sorted.tab', 'r:UTF-8').each_line do |line| | |
| parts = line.strip.split("\t") | |
| song_id = parts[0] | |
| artist = parts[1] | |
| title = parts[2] | |
| date = parts[3] | |
| country = parts[4] | |
| if last_song_id == -1 | |
| last_song_id = song_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @uri /lyrics/:artist/:title | |
| */ | |
| class Lyrics extends Tonic\Resource { | |
| /** | |
| * @method GET | |
| * @provides application/json |
NewerOlder