1
0
Fork 0
Go to file
magnolia-fan 1e7ebeb23f Minor fixes 2011-09-15 23:32:23 +04:00
lib Organized into mature package 2011-09-15 23:23:42 +04:00
src Minor fixes 2011-09-15 23:32:23 +04:00
LICENCE Organized into mature package 2011-09-15 23:23:42 +04:00
README.md Minor fixes 2011-09-15 23:32:23 +04:00

README.md

Vkontakte (VK.com) API music search tool

Don't forget to log in to vk.com API

CoffeeScript example

vk_music = new VkontakteMusic
vk_music.search "Kasabian", "L.S.F. (Lost Souls Forever)", "2:17", (url) ->
  audio = document.createElement "audio"
  audio.setAttribute "src", url
  document.getElementsByTagName("body")[0].appendChild audio
  audio.play()
  false

JavaScript example

var vk_music;
vk_music = new VkontakteMusic;
vk_music.search("Kasabian", "L.S.F. (Lost Souls Forever)", "2:17", function(url) {
  var audio;
  audio = document.createElement("audio");
  audio.setAttribute("src", url);
  document.getElementsByTagName("body")[0].appendChild(audio);
  audio.play();
  return false;
});