brynq-sdk-monday 1.2.3__tar.gz → 1.2.5__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_monday
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: Monday.com wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -17,10 +17,10 @@ class ExtractMonday(BrynQ):
17
17
  For the full documentation, see: https://developer.monday.com/api-reference/docs/basics
18
18
  """
19
19
  super().__init__()
20
- self.headers = self.__get_headers(label=label)
21
20
  self.endpoint = "https://api.monday.com/v2/"
22
21
  self.debug = debug
23
22
  self.timeout = 3600
23
+ self.headers = self.__get_headers(label=label)
24
24
 
25
25
  def __get_headers(self, label):
26
26
  credentials = self.get_system_credential(system='monday', label=label)
@@ -216,12 +216,16 @@ class ExtractMonday(BrynQ):
216
216
  :param item_ids: all the items where you want to get the column values from
217
217
  """
218
218
  # Chunk in lists of 50 items since monday.com doesn't accept requests longer than 50 items
219
+ if not isinstance(item_ids, list):
220
+ item_ids = item_ids.tolist()
221
+ else:
222
+ item_ids = item_ids
219
223
  items_list = [item_ids[pos:pos + 25] for pos in range(0, len(item_ids), 25)]
220
224
  all_data = []
221
225
 
222
226
  for chunk in items_list:
223
227
  payload = {
224
- "query": f"query {{items (ids: {json.dumps(chunk.tolist())} exclude_nonactive: false) {{id name state updated_at column_values {{ column {{ title }} id text value }} }} }}"
228
+ "query": f"query {{items (ids: {json.dumps(chunk)} exclude_nonactive: false) {{id name state updated_at column_values {{ column {{ title }} id text value }} }} }}"
225
229
  }
226
230
  payload = json.dumps(payload, ensure_ascii=False)
227
231
  if self.debug:
@@ -18,10 +18,10 @@ class UploadTracket(BrynQ):
18
18
  For the full documentation, see: https://avisi-apps.gitbook.io/tracket/api/
19
19
  """
20
20
  super().__init__()
21
- self.headers = self.__get_headers(label=label)
22
21
  self.base_url = "https://us.production.timesheet.avisi-apps.com/api/2.0/"
23
22
  self.debug = debug
24
23
  self.timeout = 3600
24
+ self.headers = self.__get_headers(label=label)
25
25
 
26
26
  def __get_headers(self, label):
27
27
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-monday
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: Monday.com wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_monday',
5
- version='1.2.3',
5
+ version='1.2.5',
6
6
  description='Monday.com wrapper from BrynQ',
7
7
  long_description='Monday.com wrapper from BrynQ',
8
8
  author='BrynQ',
@@ -17,9 +17,9 @@ class ExtractTracket(BrynQ):
17
17
  For the full documentation, see: https://avisi-apps.gitbook.io/tracket/api/
18
18
  """
19
19
  super().__init__()
20
- self.headers = self.__get_headers(label=label)
21
20
  self.base_url = "https://us.production.timesheet.avisi-apps.com/api/2.0/"
22
21
  self.timeout = 3600
22
+ self.headers = self.__get_headers(label=label)
23
23
 
24
24
  def __get_headers(self, label):
25
25
  """