mirror of
https://gitlab.silvrtree.co.uk/martind2000/booksnew.git
synced 2025-01-25 19:56:16 +00:00
45 lines
704 B
JavaScript
45 lines
704 B
JavaScript
|
|
|
|
function getJSONfeed(feedurl){
|
|
var xmlhttp= WScript.createobject("Msxml2.XMLHTTP.3.0");
|
|
|
|
xmlhttp.open( "GET", feedurl, false);
|
|
xmlhttp.send();
|
|
|
|
var rssJSON_Data = eval ("(" + xmlhttp.responseText +")");
|
|
|
|
return rssJSON_Data;
|
|
}
|
|
|
|
|
|
|
|
function getJSONfeedDUMP(feedurl){
|
|
var xmlhttp= WScript.createobject("Msxml2.XMLHTTP.3.0");
|
|
|
|
xmlhttp.open( "GET", feedurl, false);
|
|
xmlhttp.send();
|
|
|
|
|
|
WScript.Echo(xmlhttp.responseText);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var twitfeed =getJSONfeed("http://twitter.com/statuses/public_timeline.json");
|
|
|
|
|
|
|
|
WScript.Echo(twitfeed[0].user.name);
|
|
|
|
|
|
for (var i = 0; i < twitfeed.length; i++)
|
|
{
|
|
WScript.Echo(twitfeed[i].user.name);
|
|
WScript.Echo(twitfeed[i].text);
|
|
WScript.Echo("");
|
|
|
|
}
|
|
|