The JavaScript example to list files of Google Drive uses gapi.client.drive.files.list().
When trying to use this method I get the error \"Cannot read property
The JavaScript example is correct, but you have to make sure that you only use gapi.client.drive.files (and the other Drive-specific resources) when the Drive library is loaded, i.e. after: