Created
September 30, 2018 17:50
-
-
Save abfo/0eee5dec38431aa7782a8e8fd94ea437 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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