Advertisement
Guest User

Untitled

a guest
Feb 17th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var edit = function (item) {
  2.     var documentEditAudio = new XMLHttpRequest();
  3.         documentEditAudio.open('GET', 'https://api.vk.com/method/audio.edit?aid=' + item.aid
  4.                                             + '&owner_id=' + item.owner_id
  5.                                             + '&artist=' + item.artist.toUpperCase()
  6.                                             + '&title=' + item.title.toUpperCase()
  7.                                             + '&no_search=' + 0
  8.                                             + '&access_token=' + accToken, true);
  9.  
  10.         documentEditAudio.onload = function () {
  11.             var answer = JSON.parse(documentEditAudio.response);
  12.                 console.log(answer);
  13.     };
  14.  
  15.     documentEditAudio.send();
  16. }
  17.  
  18. audios.response.forEach(function (item) {
  19.     setTimeout(edit(item), 1000);
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement