<klip>
   <identity>
      <title>
         API: Prefs.codepage
      </title>
      <uniqueid>
        api_prefs-codepage_sample12345
      </uniqueid>
   </identity>
   <locations>
      <defaultlink>
        http://www.klipfolio.com/
      </defaultlink> 
      <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>
   <setup>
     <refresh>
       120 
     </refresh> 
     <codepage> 
       1252
     </codepage>
   </setup>
   <messages>
     <loading>
       Please wait, getting data...
     </loading> 
     <nodata>
       No items to display.
     </nodata> 
   </messages>
   <klipscript>
   <![CDATA[

function onLoad() {

    trace( "Querying read-only prefs:\r\n" );
    trace( "  Prefs.contentsource : " + Prefs.contentsource + "\r\n" );
    trace( "  Prefs.referer       : " + Prefs.referer + "\r\n" );
    trace( "  Prefs.codepage      : " + Prefs.codepage + "\r\n" );
    trace( "  Prefs.lastrefresh   : " + Prefs.lastrefresh  + "\r\n" );
    trace( "  Prefs.uniqueid      : " + Prefs.uniqueid  + "\r\n" );

    trace( "\r\nQuerying read/write prefs:\r\n" );   
    trace( "  Prefs.refreshrate   : " + Prefs.refreshrate + "\r\n" );
    trace( "  Prefs.defaultlink   : " + Prefs.defaultlink + "\r\n" );

    Prefs.refreshrate = 60;
    Prefs.defaultlink = "http://www.klipfolio.com/";

    trace( "\r\nAfter update:\r\n" );   
    trace( "  Prefs.refreshrate   : " + Prefs.refreshrate + "\r\n" );
    trace( "  Prefs.defaultlink   : " + Prefs.defaultlink + "\r\n" );
}

function onRefresh()
{
    var xml = "<xml><item><link></link><description>" +
          "(See Debug Window for output)" +
          "</description></item></xml>";

    return Engines.Data.process( xml );

}
   ]]>
   </klipscript>
</klip>

