brynq-sdk-zoho 2.0.2__tar.gz → 2.0.4__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_zoho
3
- Version: 2.0.2
3
+ Version: 2.0.4
4
4
  Summary: ZOHO wrapper from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
@@ -0,0 +1,2 @@
1
+ from .upload_zoho_desk import UploadZohoDesk
2
+ from .extract_zoho_desk import ExtractZohoDesk
@@ -20,6 +20,7 @@ class ExtractZohoDesk(BrynQ):
20
20
  self.headers = self._get_authentication(label=label)
21
21
  self.base_url = "https://desk.zoho.com/api/v1/"
22
22
  self.payload = {}
23
+ self.timeout = 3600
23
24
 
24
25
  def _get_authentication(self, label):
25
26
  """
@@ -156,9 +157,9 @@ class ExtractZohoDesk(BrynQ):
156
157
  This function helps the API calls to do a single call in one function
157
158
  :return:
158
159
  """
159
- response = requests.request("GET", url, headers=self.headers, data=self.payload)
160
+ response = requests.request("GET", url, headers=self.headers, data=self.payload, timeout=self.timeout)
160
161
  if response.status_code == 401:
161
- response = requests.request("GET", url, headers=self.headers, data=self.payload)
162
+ response = requests.request("GET", url, headers=self.headers, data=self.payload, timeout=self.timeout)
162
163
  if response.status_code == 200:
163
164
  df = response.json()
164
165
  if 'data' in df:
@@ -19,6 +19,7 @@ class UploadZohoDesk(BrynQ):
19
19
  super().__init__()
20
20
  self.headers = self._get_authentication(label=label)
21
21
  self.base_url = "https://desk.zoho.com/api/v1/"
22
+ self.timeout = 3600
22
23
 
23
24
  def _get_authentication(self, label):
24
25
  """
@@ -45,5 +46,5 @@ class UploadZohoDesk(BrynQ):
45
46
  :param payload: dict
46
47
  """
47
48
  url = f"{self.base_url}tickets/{ticket_id}/timeEntry/{time_entry_id}"
48
- response = requests.request("PATCH", url, headers=self.headers, data=json.dumps(payload))
49
+ response = requests.request("PATCH", url, headers=self.headers, data=json.dumps(payload), timeout=self.timeout)
49
50
  return response
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-zoho
3
- Version: 2.0.2
3
+ Version: 2.0.4
4
4
  Summary: ZOHO 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_zoho',
5
- version='2.0.2',
5
+ version='2.0.4',
6
6
  description='ZOHO wrapper from BrynQ',
7
7
  long_description='ZOHO wrapper from BrynQ',
8
8
  author='BrynQ',
@@ -1 +0,0 @@
1
- from .upload_zoho_desk import UploadZohoDesk
File without changes