Skip to content

Instantly share code, notes, and snippets.

@joshtwist
Last active December 13, 2015 21:08
Show Gist options
  • Select an option

  • Save joshtwist/4975321 to your computer and use it in GitHub Desktop.

Select an option

Save joshtwist/4975321 to your computer and use it in GitHub Desktop.
Creating blob files for Windows 8 Periodic Notifications - this is the scheduler script
var accountName = '<YOUR STORAGE ACCOUNT NAME HERE>';
var accountKey = '<YOUR STORAGE ACCOUNT KEY HERE>';
var azure = require('azure');
var blobService = azure.createBlobService(accountName, accountKey);
function pulling() {
var xml = '<tile>' +
'<visual>' +
'<binding template="TileSquarePeekImageAndText01">' +
'<text id="1">' + new Date().toString() + '</text>' +
'<image id="1" src="http://www.thejoyofcode.com/uploads/josh.jpg" />' +
'</binding></visual></tile>';
var opt = { contentType: 'text/xml' };
blobService.createBlockBlobFromText('tiles', 'news.xml', xml, opt, function(err) {
if (err) {
console.error(err);
}
else {
console.log('updated tile');
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment