Skip to content

Instantly share code, notes, and snippets.

@abfo
Created September 30, 2018 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abfo/0eee5dec38431aa7782a8e8fd94ea437 to your computer and use it in GitHub Desktop.
Save abfo/0eee5dec38431aa7782a8e8fd94ea437 to your computer and use it in GitHub Desktop.
function downloadFrame() {
var timestamp = Date.now().toString();
var url = 'https://nexusapi.dropcam.com/get_image?uuid=12345&height=1280&cb=' + timestamp;
var response = UrlFetchApp.fetch(url);
var blob = response.getBlob();
blob.setName(timestamp + '.jpg');
var folders = DriveApp.getFoldersByName('DCFrames');
while (folders.hasNext()) {
var folder = folders.next();
folder.createFile(blob);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment