(self, type_val)
| 4412 | return res |
| 4413 | |
| 4414 | def aiting_complete_task_api(self, type_val): |
| 4415 | timestamp = self.aiting_timestamp() |
| 4416 | nonce = self.aiting_nonce() |
| 4417 | sign_params = {'jwt': self.aiting_jwt, 'nonestr': nonce, 'osversion': 'Android12', 'terminalName': 'Redmi', 'timestamp': timestamp} |
| 4418 | sign_str = '&'.join([f"{k}={sign_params[k]}" for k in sorted(sign_params.keys())]) |
| 4419 | requertid = self.aiting_md5(f"{sign_str}&key={AITING_SIGN_KEY_REQUERTID}") |
| 4420 | body_params = {'source': '3', 'timestamp': timestamp, 'token': self.aiting_woread_token, 'type': str(type_val), 'userid': self.aiting_base_userid} |
| 4421 | body_str = '&'.join([f"{k}={body_params[k]}" for k in sorted(body_params.keys())]) |
| 4422 | sign = self.aiting_md5(f"{body_str}&key={AITING_SIGN_KEY_API}") |
| 4423 | url = f"{AITING_BASE_URL}/activity/rest/unicom/points/completiontask" |
| 4424 | payload = {**body_params, 'sign': sign} |
| 4425 | headers = { |
| 4426 | 'AuthorizationClient': f"Bearer {self.aiting_jwt}", |
| 4427 | 'requerttime': timestamp, |
| 4428 | 'nonestr': nonce, |
| 4429 | 'requertid': requertid, |
| 4430 | 'statisticsinfo': self.aiting_statisticsinfo |
| 4431 | } |
| 4432 | self.session.post(url, json=payload, headers=headers) |
| 4433 | |
| 4434 | def aiting_get_secretkey(self): |
| 4435 | timestamp = self.aiting_timestamp() |
no test coverage detected