Last active
July 11, 2016 05:07
-
-
Save jsgao0/b4f787ca589131200215ab57aacbcc68 to your computer and use it in GitHub Desktop.
Retrieve File From Google Drive Using Google Drive v2.
This file contains hidden or 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
<html> | |
<head> | |
<script> | |
function driveRequest() { | |
var request = gapi.client.drive.files.get({ | |
'fileId': 'File ID' | |
}); | |
request.then(function(response) { | |
// response is the result. | |
}); | |
} | |
function init() { | |
gapi.client.setApiKey('Your API Key'); | |
gapi.client.load('drive', 'v2').then(driveRequest); | |
} | |
</script> | |
<script src="https://apis.google.com/js/client.js?onload=init"></script> | |
</head> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment