Skip to content

Commit

Permalink
Update serializer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDrang committed Dec 14, 2023
1 parent 31d3318 commit 3697922
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/python_rucaptcha/core/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ class TaskSer(MyBaseModel):
type: str


class ErrorFieldsSer(Struct):
errorCode: str = None
errorDescription: str = None


class CreateTaskBaseSer(MyBaseModel):
clientKey: str
task: TaskSer = {}
Expand Down Expand Up @@ -62,8 +57,7 @@ def urls_set(self):
"""


class GetTaskResultResponseSer(MyBaseModel, ErrorFieldsSer):
errorId: int = 0
class GetTaskResultResponseSer(MyBaseModel):
status: str = "ready"
solution: dict = None
cost: float = None
Expand All @@ -74,3 +68,7 @@ class GetTaskResultResponseSer(MyBaseModel, ErrorFieldsSer):
taskId: int = None
# control method params
balance: float = None
# error info
errorId: int = 0
errorCode: str = None
errorDescription: str = None

0 comments on commit 3697922

Please sign in to comment.