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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq_sdk_google_drive
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Google Drive wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -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
- response = requests.get(url=url, headers=headers)
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-google-drive
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Google Drive wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -3,7 +3,7 @@ from setuptools import setup
3
3
 
4
4
  setup(
5
5
  name='brynq_sdk_google_drive',
6
- version='0.1.0',
6
+ version='0.2.0',
7
7
  description='Google Drive wrapper from BrynQ',
8
8
  long_description='Groogle Drive wrapper from BrynQ',
9
9
  author='BrynQ',