< rt2.me

Javascript API

Include rt2.js and then use it as follows:

rt2([url to convert], [callback of converted url]);

Example:

There's a div below that has an ID of "output". Here is some code:

document.getElementById("output").innerHTML = "Fetching..."; rt2("http://www.youtube.com/watch?v=dQw4w9WgXcQ", function(result) { document.getElementById("output").innerHTML = result; });