brynq-sdk-zoho 1.0.1__tar.gz → 1.0.3__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_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/PKG-INFO +1 -1
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk/zoho/extract_zoho_desk.py +3 -5
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk/zoho/upload_zoho_desk.py +2 -4
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk_zoho.egg-info/PKG-INFO +1 -1
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/setup.py +1 -1
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk/zoho/__init__.py +0 -0
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk_zoho.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk_zoho.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk_zoho.egg-info/not-zip-safe +0 -0
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk_zoho.egg-info/requires.txt +0 -0
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/brynq_sdk_zoho.egg-info/top_level.txt +0 -0
- {brynq_sdk_zoho-1.0.1 → brynq_sdk_zoho-1.0.3}/setup.cfg +0 -0
|
@@ -17,11 +17,11 @@ class ExtractZohoDesk(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.
|
|
20
|
+
self.headers = self._get_authentication(label=label)
|
|
21
21
|
self.base_url = "https://desk.zoho.com/api/v1/"
|
|
22
22
|
self.payload = {}
|
|
23
23
|
|
|
24
|
-
def
|
|
24
|
+
def _get_authentication(self, label):
|
|
25
25
|
"""
|
|
26
26
|
Get the credentials for the Tracket API from BrynQ, with those credentials, get the access_token for Tracket.
|
|
27
27
|
Return the headers with the access_token.
|
|
@@ -30,12 +30,10 @@ class ExtractZohoDesk(BrynQ):
|
|
|
30
30
|
credentials = self.get_system_credential(system='zoho-desk', label=label)
|
|
31
31
|
|
|
32
32
|
# With those credentials, get the access_token from Tracket
|
|
33
|
-
org_id = credentials["config"]["organisation_id"]
|
|
34
33
|
zoho_system_id = credentials["id"]
|
|
35
34
|
token = BrynQ().refresh_system_credential(system="zoho-desk", system_id=zoho_system_id)["access_token"]
|
|
36
35
|
headers = {
|
|
37
|
-
'Authorization': f'Zoho-oauthtoken {token}'
|
|
38
|
-
'orgId': f'{org_id}',
|
|
36
|
+
'Authorization': f'Zoho-oauthtoken {token}'
|
|
39
37
|
}
|
|
40
38
|
return headers
|
|
41
39
|
|
|
@@ -17,10 +17,10 @@ class UploadZohoDesk(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.
|
|
20
|
+
self.headers = self._get_authentication(label=label)
|
|
21
21
|
self.base_url = "https://desk.zoho.com/api/v1/"
|
|
22
22
|
|
|
23
|
-
def
|
|
23
|
+
def _get_authentication(self, label):
|
|
24
24
|
"""
|
|
25
25
|
Get the credentials for the Traket API from BrynQ, with those credentials, get the access_token for Tracket.
|
|
26
26
|
Return the headers with the access_token.
|
|
@@ -29,12 +29,10 @@ class UploadZohoDesk(BrynQ):
|
|
|
29
29
|
credentials = self.get_system_credential(system='zoho-desk', label=label)
|
|
30
30
|
|
|
31
31
|
# With those credentials, get the access_token from Tracket
|
|
32
|
-
org_id = credentials["config"]["organisation_id"]
|
|
33
32
|
zoho_system_id = credentials["id"]
|
|
34
33
|
token = BrynQ().refresh_system_credential(system="zoho-desk", system_id=zoho_system_id)["access_token"]
|
|
35
34
|
headers = {
|
|
36
35
|
'Authorization': f'Zoho-oauthtoken {token}',
|
|
37
|
-
'orgId': f'{org_id}',
|
|
38
36
|
'Content-Type': 'application/json'
|
|
39
37
|
}
|
|
40
38
|
return headers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|