mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-61768 repository_googledocs: Rest API function to list shared drives
Adds a new rest API function in the googledocs repository which would return the existing shared drives.
This commit is contained in:
parent
511a87f5fc
commit
241e778ca7
@ -51,7 +51,10 @@ class rest extends \core\oauth2\rest {
|
||||
'pageSize' => PARAM_INT,
|
||||
'pageToken' => PARAM_RAW,
|
||||
'q' => PARAM_RAW,
|
||||
'spaces' => PARAM_RAW
|
||||
'spaces' => PARAM_RAW,
|
||||
'supportsAllDrives' => PARAM_RAW,
|
||||
'includeItemsFromAllDrives' => PARAM_RAW,
|
||||
'corpora' => PARAM_RAW
|
||||
],
|
||||
'response' => 'json'
|
||||
],
|
||||
@ -123,6 +126,17 @@ class rest extends \core\oauth2\rest {
|
||||
],
|
||||
'response' => 'json'
|
||||
],
|
||||
'shared_drives_list' => [
|
||||
'endpoint' => 'https://www.googleapis.com/drive/v3/drives',
|
||||
'method' => 'get',
|
||||
'args' => [
|
||||
'pageSize' => PARAM_INT,
|
||||
'pageToken' => PARAM_RAW,
|
||||
'q' => PARAM_RAW,
|
||||
'useDomainAdminAccess' => PARAM_RAW,
|
||||
],
|
||||
'response' => 'json',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,10 @@ information provided here is intended especially for developers. Full
|
||||
details of the repository API are available on Moodle docs:
|
||||
http://docs.moodle.org/dev/Repository_API
|
||||
|
||||
=== 3.11 ===
|
||||
* The Google Drive repository now includes a new rest API function 'shared_drives_list', which can be used to fetch
|
||||
a list of existing shared drives.
|
||||
|
||||
=== 3.4 ===
|
||||
Repositories should no longer directly call file_system#add_file_to_pool or file_system#add_string_to_pool
|
||||
instead they should call the stored_file method, set_synchronised_content_from_file or set_synchronised_content_from_string
|
||||
|
Loading…
x
Reference in New Issue
Block a user