Returns the list of the files of Google Drive.
1 google.drive.list
Returns the ResultSet of the files of the Google Drive.
<google.drive.list
credentials-json='credentials-json'
credentials-path='credentials-path'
/>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Acredentials-json | string | String of the JSON of the credentials provided by Google Drive. It is not required if the attribute credentials-path exists. | |||
Acredentials-path | string | Directory of the JSON of the credentials provided by Google Drive. It is not required if the attribute credentials-json exists. |
To obtain tge credentials of de Google Drive, follow the next steps:
- Go to Google API Console.
- From the dropdown menu of the project, select its project. If there is none, create a new one.
- En the page Credentials, select the dropdown menu Create credentials, then select Service account key.
- From the dropdown menu of the Service account, select a existing service account or create a new one.
- To Key type, select the option key JSON, then select Create. The file is automatically downloaded in its computer.
- Place the file *.json that you just downloaded to a directory of your choice. This directory must be private (nobody must have access to it) but it must rest accessible for your web server code.
Example
ResultSet of the files of Google Drive.
Copy
<xsql-script name=''> <body> <google.drive.list credentials-path="/Users/nameuser/Desktop/fileName.json" /> </body> </xsql-script>