leadguru-jobs 0.587.0__py3-none-any.whl → 0.589.0__py3-none-any.whl
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.
- {leadguru_jobs-0.587.0.dist-info → leadguru_jobs-0.589.0.dist-info}/METADATA +1 -1
- {leadguru_jobs-0.587.0.dist-info → leadguru_jobs-0.589.0.dist-info}/RECORD +5 -5
- lgt_jobs/lgt_common/slack_client/slack_client.py +6 -10
- {leadguru_jobs-0.587.0.dist-info → leadguru_jobs-0.589.0.dist-info}/WHEEL +0 -0
- {leadguru_jobs-0.587.0.dist-info → leadguru_jobs-0.589.0.dist-info}/top_level.txt +0 -0
@@ -36,7 +36,7 @@ lgt_jobs/lgt_common/pubsub/messages.py,sha256=rm7uKbxwDTWJqsVA8Kee-4YT58bThjCEV2
|
|
36
36
|
lgt_jobs/lgt_common/pubsub/pubsubfactory.py,sha256=rfUDooYuhBQ2pE9FdDxZOpXjbrvlpiiQLCGOtnTFbSg,2204
|
37
37
|
lgt_jobs/lgt_common/slack_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
lgt_jobs/lgt_common/slack_client/methods.py,sha256=ctKF_1UHEmSWaRsoGEgMZicVabV7eEufZ7pjxdMAx8g,1455
|
39
|
-
lgt_jobs/lgt_common/slack_client/slack_client.py,sha256=
|
39
|
+
lgt_jobs/lgt_common/slack_client/slack_client.py,sha256=XUwXQfjDC1etFjKlcmP2d5tUWbNzxjklBLHRobY3gsw,13820
|
40
40
|
lgt_jobs/lgt_common/slack_client/web_client.py,sha256=JrkEepL6EhEtX3Psv_sd25bcRB2P23LoGnFHcczQpnc,4778
|
41
41
|
lgt_jobs/lgt_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
42
|
lgt_jobs/lgt_data/analytics.py,sha256=fiN88zcIxs_bRMmXL7ftp4FvBeJ5I7QBPE4tbwKJ39E,21689
|
@@ -48,7 +48,7 @@ lgt_jobs/lgt_data/mongo_repository.py,sha256=kLE906lfqhHF9gp1qvH_3XKCZGCZnxjLMrB
|
|
48
48
|
lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
lgt_jobs/services/web_client.py,sha256=GLWsJkIC8rv6xLFaLwcMm4EwBlVDu0njORwkZqBJaE4,2086
|
50
50
|
lgt_jobs/templates/new_message.html,sha256=dZl8UmdAOOMq4nidvAgMFroSrTV7Pw0RWt2yLp_2idg,6989
|
51
|
-
leadguru_jobs-0.
|
52
|
-
leadguru_jobs-0.
|
53
|
-
leadguru_jobs-0.
|
54
|
-
leadguru_jobs-0.
|
51
|
+
leadguru_jobs-0.589.0.dist-info/METADATA,sha256=g9G70bh3-dXqqcQy1uPHw6kHY6GZIc8Pg8V_zXh68CU,1319
|
52
|
+
leadguru_jobs-0.589.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
53
|
+
leadguru_jobs-0.589.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
|
54
|
+
leadguru_jobs-0.589.0.dist-info/RECORD,,
|
@@ -179,12 +179,13 @@ class SlackClient:
|
|
179
179
|
url = f'{self.base_url}{SlackMethods.conversations_replies}?{self.__ts_payload(channel, id)}'
|
180
180
|
return requests.get(url=url, cookies=self.cookies).json()
|
181
181
|
|
182
|
-
def post_message(self, channel: str, text: str):
|
182
|
+
def post_message(self, channel: str, text: str, thread_ts: str = None):
|
183
183
|
import uuid
|
184
184
|
payload = {
|
185
185
|
'channel': channel,
|
186
186
|
'text': text,
|
187
|
-
'client_msg_id': str(uuid.uuid4())
|
187
|
+
'client_msg_id': str(uuid.uuid4()),
|
188
|
+
'thread_ts': thread_ts
|
188
189
|
}
|
189
190
|
url = f'{self.base_url}{SlackMethods.chat_post_message}'
|
190
191
|
return requests.post(url=url, cookies=self.cookies, headers=self.headers, data=payload).json()
|
@@ -201,17 +202,13 @@ class SlackClient:
|
|
201
202
|
payload = {'email': email}
|
202
203
|
headers = {'User-Agent': user_agent}
|
203
204
|
response = requests.post(f"{self.base_url}/{SlackMethods.check_email}", params=payload, headers=headers)
|
204
|
-
if response.status_code
|
205
|
-
return False
|
206
|
-
return response.json()['ok']
|
205
|
+
return response.json()['ok'] if response.status_code == 200 else False
|
207
206
|
|
208
207
|
def confirm_email(self, email: str, user_agent: str, locale: str = 'en-US') -> bool:
|
209
208
|
payload = {'email': email, 'locale': locale}
|
210
209
|
headers = {'User-Agent': user_agent}
|
211
210
|
response = requests.post(f"{self.base_url}/{SlackMethods.confirm_email}", params=payload, headers=headers)
|
212
|
-
if response.status_code
|
213
|
-
return False
|
214
|
-
return response.json()['ok']
|
211
|
+
return response.json()['ok'] if response.status_code == 200 else False
|
215
212
|
|
216
213
|
def confirm_code(self, email: str, code: str, user_agent: str) -> requests.Response:
|
217
214
|
payload = {'email': email, 'code': code}
|
@@ -249,8 +246,7 @@ class SlackClient:
|
|
249
246
|
|
250
247
|
def test_auth(self):
|
251
248
|
headers = {"Authorization": f"Bearer {self.token}"}
|
252
|
-
return requests.post(f"{self.base_url}/{SlackMethods.auth_test}", headers=headers,
|
253
|
-
cookies=self.cookies)
|
249
|
+
return requests.post(f"{self.base_url}/{SlackMethods.auth_test}", headers=headers, cookies=self.cookies)
|
254
250
|
|
255
251
|
def __user_info_payload(self, user):
|
256
252
|
payload = {
|
File without changes
|
File without changes
|