1

I'm trying to access the top ten trending videos of youtube using their API's. On their website it says use the get request to the link https://gdata.youtube.com/feeds/api/standardfeeds/on_the_web. How would I implement this in Javascript and how exactly would I store the results? Would it be in an array?

Thanks in advance!

idude
  • 4,654
  • 8
  • 35
  • 49

1 Answers1

1

To issue get request you may use jQuery: http://api.jquery.com/jQuery.get/

The result will be text of HTML page (it comes in get request callback). To make it into array you should parse it yourself. Since the page is simple, I think regular expressions will be enough: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions

alehro
  • 2,198
  • 2
  • 25
  • 41