forked from libuke/aliyundrive-checkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliyundrive_info.py
28 lines (25 loc) · 938 Bytes
/
aliyundrive_info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class AliyundriveInfo:
def __init__(
self,
success: bool,
user_name: str,
signin_count: int,
message: str,
reward_notice: str,
task_notice: str):
self.success = success
self.user_name = user_name
self.signin_count = signin_count
self.message = message
self.reward_notice = reward_notice
self.task_notice = task_notice
def __str__(self) -> str:
message_all = ''
if self.success:
message_all = f'用户:{self.user_name}\n' \
f'签到:本月已签到{self.signin_count}次\n' \
f'奖励:{self.reward_notice}\n' \
f'任务:{self.task_notice}'
else:
message_all = f'签到失败\n错误信息:{self.message}'
return message_all