brynq-sdk-monday 1.2.2__tar.gz → 1.2.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_monday-1.2.2 → brynq_sdk_monday-1.2.3}/PKG-INFO +1 -1
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday/extract_monday.py +7 -6
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday/extract_tracket.py +4 -3
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday/upload_tracket.py +5 -4
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday.egg-info/PKG-INFO +1 -1
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/setup.py +1 -1
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday/__init__.py +0 -0
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday.egg-info/not-zip-safe +0 -0
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday.egg-info/requires.txt +0 -0
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday.egg-info/top_level.txt +0 -0
- {brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/setup.cfg +0 -0
|
@@ -20,6 +20,7 @@ class ExtractMonday(BrynQ):
|
|
|
20
20
|
self.headers = self.__get_headers(label=label)
|
|
21
21
|
self.endpoint = "https://api.monday.com/v2/"
|
|
22
22
|
self.debug = debug
|
|
23
|
+
self.timeout = 3600
|
|
23
24
|
|
|
24
25
|
def __get_headers(self, label):
|
|
25
26
|
credentials = self.get_system_credential(system='monday', label=label)
|
|
@@ -51,7 +52,7 @@ class ExtractMonday(BrynQ):
|
|
|
51
52
|
})
|
|
52
53
|
if self.debug:
|
|
53
54
|
print(payload)
|
|
54
|
-
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload)
|
|
55
|
+
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload, timeout=self.timeout)
|
|
55
56
|
if self.debug:
|
|
56
57
|
print(response.json())
|
|
57
58
|
response.raise_for_status()
|
|
@@ -153,7 +154,7 @@ class ExtractMonday(BrynQ):
|
|
|
153
154
|
})
|
|
154
155
|
if self.debug:
|
|
155
156
|
print(payload)
|
|
156
|
-
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload)
|
|
157
|
+
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload, timeout=self.timeout)
|
|
157
158
|
if self.debug:
|
|
158
159
|
print(response.json())
|
|
159
160
|
response.raise_for_status()
|
|
@@ -176,7 +177,7 @@ class ExtractMonday(BrynQ):
|
|
|
176
177
|
})
|
|
177
178
|
if self.debug:
|
|
178
179
|
print(payload)
|
|
179
|
-
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload)
|
|
180
|
+
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload, timeout=self.timeout)
|
|
180
181
|
if self.debug:
|
|
181
182
|
print(response.json())
|
|
182
183
|
response.raise_for_status()
|
|
@@ -199,7 +200,7 @@ class ExtractMonday(BrynQ):
|
|
|
199
200
|
})
|
|
200
201
|
if self.debug:
|
|
201
202
|
print(payload)
|
|
202
|
-
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload)
|
|
203
|
+
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload, timeout=self.timeout)
|
|
203
204
|
if self.debug:
|
|
204
205
|
print(response.json())
|
|
205
206
|
response.raise_for_status()
|
|
@@ -225,7 +226,7 @@ class ExtractMonday(BrynQ):
|
|
|
225
226
|
payload = json.dumps(payload, ensure_ascii=False)
|
|
226
227
|
if self.debug:
|
|
227
228
|
print(payload)
|
|
228
|
-
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload)
|
|
229
|
+
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload, timeout=self.timeout)
|
|
229
230
|
if self.debug:
|
|
230
231
|
print(response.json())
|
|
231
232
|
response.raise_for_status()
|
|
@@ -301,7 +302,7 @@ class ExtractMonday(BrynQ):
|
|
|
301
302
|
print(payload)
|
|
302
303
|
continue_loop = True
|
|
303
304
|
while continue_loop:
|
|
304
|
-
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload)
|
|
305
|
+
response = requests.request("POST", self.endpoint, headers=self.headers, data=payload, timeout=self.timeout)
|
|
305
306
|
if self.debug:
|
|
306
307
|
print(response.json())
|
|
307
308
|
response.raise_for_status()
|
|
@@ -19,6 +19,7 @@ class ExtractTracket(BrynQ):
|
|
|
19
19
|
super().__init__()
|
|
20
20
|
self.headers = self.__get_headers(label=label)
|
|
21
21
|
self.base_url = "https://us.production.timesheet.avisi-apps.com/api/2.0/"
|
|
22
|
+
self.timeout = 3600
|
|
22
23
|
|
|
23
24
|
def __get_headers(self, label):
|
|
24
25
|
"""
|
|
@@ -37,7 +38,7 @@ class ExtractTracket(BrynQ):
|
|
|
37
38
|
"client-secret": credentials['client_secret']
|
|
38
39
|
})
|
|
39
40
|
headers = {'Content-Type': 'application/json'}
|
|
40
|
-
tracket_response = requests.request("POST", endpoint, headers=headers, data=payload)
|
|
41
|
+
tracket_response = requests.request("POST", endpoint, headers=headers, data=payload, timeout=self.timeout)
|
|
41
42
|
tracket_response.raise_for_status()
|
|
42
43
|
|
|
43
44
|
# Return the headers with the access_token
|
|
@@ -76,7 +77,7 @@ class ExtractTracket(BrynQ):
|
|
|
76
77
|
df = pd.DataFrame()
|
|
77
78
|
full_url = endpoint
|
|
78
79
|
while continue_loop:
|
|
79
|
-
response = requests.get(full_url, headers=self.headers)
|
|
80
|
+
response = requests.get(full_url, headers=self.headers, timeout=self.timeout)
|
|
80
81
|
response.raise_for_status()
|
|
81
82
|
response_data = response.json()
|
|
82
83
|
worklogs = response_data.get('items')
|
|
@@ -96,7 +97,7 @@ class ExtractTracket(BrynQ):
|
|
|
96
97
|
Get all the hour categories from Tracket.
|
|
97
98
|
"""
|
|
98
99
|
endpoint = f'{self.base_url}categories'
|
|
99
|
-
response = requests.request("GET", endpoint, headers=self.headers)
|
|
100
|
+
response = requests.request("GET", endpoint, headers=self.headers, timeout=self.timeout)
|
|
100
101
|
response.raise_for_status()
|
|
101
102
|
data = response.json()['categories']
|
|
102
103
|
df = pd.DataFrame(data)
|
|
@@ -21,6 +21,7 @@ class UploadTracket(BrynQ):
|
|
|
21
21
|
self.headers = self.__get_headers(label=label)
|
|
22
22
|
self.base_url = "https://us.production.timesheet.avisi-apps.com/api/2.0/"
|
|
23
23
|
self.debug = debug
|
|
24
|
+
self.timeout = 3600
|
|
24
25
|
|
|
25
26
|
def __get_headers(self, label):
|
|
26
27
|
"""
|
|
@@ -39,7 +40,7 @@ class UploadTracket(BrynQ):
|
|
|
39
40
|
"client-secret": credentials['client_secret']
|
|
40
41
|
})
|
|
41
42
|
headers = {'Content-Type': 'application/json'}
|
|
42
|
-
tracket_response = requests.request("POST", endpoint, headers=headers, data=payload)
|
|
43
|
+
tracket_response = requests.request("POST", endpoint, headers=headers, data=payload, timeout=self.timeout)
|
|
43
44
|
|
|
44
45
|
# Return the headers with the access_token
|
|
45
46
|
access_token = tracket_response.json()['access_token']
|
|
@@ -92,7 +93,7 @@ class UploadTracket(BrynQ):
|
|
|
92
93
|
if self.debug:
|
|
93
94
|
print(json.dumps(base_body))
|
|
94
95
|
|
|
95
|
-
response = requests.request("POST", url, data=json.dumps(base_body), headers=self.headers)
|
|
96
|
+
response = requests.request("POST", url, data=json.dumps(base_body), headers=self.headers, timeout=self.timeout)
|
|
96
97
|
return response
|
|
97
98
|
|
|
98
99
|
def update_worklog(self, worklog_id: str, data: dict) -> requests.Response:
|
|
@@ -125,7 +126,7 @@ class UploadTracket(BrynQ):
|
|
|
125
126
|
if self.debug:
|
|
126
127
|
print(json.dumps(base_body))
|
|
127
128
|
|
|
128
|
-
response = requests.request("PUT", url, data=json.dumps(base_body), headers=self.headers)
|
|
129
|
+
response = requests.request("PUT", url, data=json.dumps(base_body), headers=self.headers, timeout=self.timeout)
|
|
129
130
|
return response
|
|
130
131
|
|
|
131
132
|
def delete_worklog(self, worklog_id: str) -> requests.Response:
|
|
@@ -134,5 +135,5 @@ class UploadTracket(BrynQ):
|
|
|
134
135
|
:param worklog_id: The ID of the worklog that you want to delete.
|
|
135
136
|
"""
|
|
136
137
|
url = (f'{self.base_url}timeEntries/{worklog_id}')
|
|
137
|
-
response = requests.request("DELETE", url, headers=self.headers)
|
|
138
|
+
response = requests.request("DELETE", url, headers=self.headers, timeout=self.timeout)
|
|
138
139
|
return response
|
|
File without changes
|
|
File without changes
|
{brynq_sdk_monday-1.2.2 → brynq_sdk_monday-1.2.3}/brynq_sdk_monday.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|