brynq-sdk-google-drive 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/PKG-INFO +1 -1
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk/google_drive/google_drive.py +11 -3
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk_google_drive.egg-info/PKG-INFO +1 -1
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/setup.py +1 -1
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk/google_drive/__init__.py +0 -0
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk_google_drive.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk_google_drive.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk_google_drive.egg-info/not-zip-safe +0 -0
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk_google_drive.egg-info/requires.txt +0 -0
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk_google_drive.egg-info/top_level.txt +0 -0
- {brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/setup.cfg +0 -0
{brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk/google_drive/google_drive.py
RENAMED
|
@@ -32,13 +32,21 @@ class GoogleDrive(BrynQ):
|
|
|
32
32
|
print(headers)
|
|
33
33
|
return headers
|
|
34
34
|
|
|
35
|
-
def list_files(self):
|
|
35
|
+
def list_files(self, drive_id: str = None):
|
|
36
36
|
"""
|
|
37
|
-
Get all files from Google Drive
|
|
37
|
+
Get all files from Google Drive, including shared drives or a specific drive is specified
|
|
38
|
+
:param drive_id: ID of a specific drive (optional)
|
|
38
39
|
"""
|
|
39
40
|
url = f'{self.base_url}files'
|
|
40
41
|
headers = self._get_google_drive_headers()
|
|
41
|
-
|
|
42
|
+
params = {
|
|
43
|
+
'supportsAllDrives': True,
|
|
44
|
+
'includeItemsFromAllDrives': True,
|
|
45
|
+
}
|
|
46
|
+
if drive_id:
|
|
47
|
+
params['driveId'] = drive_id
|
|
48
|
+
params['corpora'] = 'drive'
|
|
49
|
+
response = requests.get(url=url, headers=headers, params=params)
|
|
42
50
|
response.raise_for_status()
|
|
43
51
|
return response
|
|
44
52
|
|
{brynq_sdk_google_drive-0.1.0 → brynq_sdk_google_drive-0.2.0}/brynq_sdk/google_drive/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|