<klip>
<identity>
<title>
API: 304 Not Modified
</title>
</identity>
<locations>
<contentsource>
http://support.klipfolio.com/files/demo/demo.xml
</contentsource>
<icon>
http://www.klipfolio.com/static/klips/klipfolio/sample_icon.png
</icon>
<banner>
http://www.klipfolio.com/static/klips/klipfolio/sample_banner.png
</banner>
</locations>
<style>
alert {
type: item;
}
sender {
itemcol: 2;
noterow: 1;
label: "Sender";
emphasis: strong;
}
summary {
itemcol: 3;
noterow: 4;
wrap: false;
notelabel: false;
}
date {
itemcol: 4;
noterow: 2;
format: "nolocaltime";
label: "Date";
}
category {
noterow: 3;
label: "Category";
}
level {
itemcol: 1;
noterow: 5;
notelabel: false;
type: image;
}
url {
type: link;
}
id {
key: override;
}
</style>
<klipscript>
<![CDATA[
function onRefresh() {
traceln( "---------------------- Refreshing" );
var request = Engines.HTTP.newRequest( Prefs.contentsource );
doHTTPRequest( request );
return true;
}
function doHTTPRequest( request ) {
// If the HTTP request is sent successfully
if ( request.send() ) {
// And if a new/changed set of data is returned by the server
if ( request.response.data ) {
traceln( request.response.headers );
// Add the data to the Klip
Engines.Data.process( request.response.data );
}
// If the data hasn't changed since the last request
else {
traceln( request.response.headers );
}
}
else {
traceln( "---------------------- Could not reach: " + request.url );
}
}
]]>
</klipscript>
</klip>