Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created March 5, 2012 11:17
Show Gist options
  • Select an option

  • Save thinkphp/1977907 to your computer and use it in GitHub Desktop.

Select an option

Save thinkphp/1977907 to your computer and use it in GitHub Desktop.
yqlcache usage
var username = 'yelf';
yqlcache.get({
yql: 'use "http://thinkphp.ro/apps/lastfm.js/YQL-open-data-table/recentlastfm.xml" as lastfm;select * from lastfm where username="'+ username +'" and api_key="2993c6e15c91a2890c2f11fa95673067"',
id:'lastfm_'+username,
cacheage: (60*60*1000),
callback: function(o) {
console.log(o);
document.getElementById('result').innerHTML = o.data.result;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment