Skip to content

Commit 14b8b4d

Browse files
committed
Update SDK using contracts version 0beb317e0637cbbc12e8094d64320f18c50e200b
1 parent 5710e95 commit 14b8b4d

2 files changed

Lines changed: 26 additions & 16 deletions

File tree

‎eolymp/judge/score_service_http.py‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ def __init__(self, transport, url="https://api.eolymp.com"):
1515
self.url = url
1616

1717
def DescribeViewerScore(self, request, **kwargs):
18-
path = "/introspect/score"
18+
path = "/contests/"+urllib.parse.quote(request.contest_id)+"/introspect/score"
19+
20+
# Cleanup URL parameters to avoid any ambiguity
21+
request.contest_id = ""
1922

2023
return self.transport.request(
2124
method="GET",
@@ -26,9 +29,10 @@ def DescribeViewerScore(self, request, **kwargs):
2629
)
2730

2831
def DescribeScore(self, request, **kwargs):
29-
path = "/participants/"+urllib.parse.quote(request.participant_id)+"/score"
32+
path = "/contests/"+urllib.parse.quote(request.contest_id)+"/participants/"+urllib.parse.quote(request.participant_id)+"/score"
3033

3134
# Cleanup URL parameters to avoid any ambiguity
35+
request.contest_id = ""
3236
request.participant_id = ""
3337

3438
return self.transport.request(
@@ -40,9 +44,10 @@ def DescribeScore(self, request, **kwargs):
4044
)
4145

4246
def ListScoreTimeline(self, request, **kwargs):
43-
path = "/participants/"+urllib.parse.quote(request.participant_id)+"/score-timeline"
47+
path = "/contests/"+urllib.parse.quote(request.contest_id)+"/participants/"+urllib.parse.quote(request.participant_id)+"/score-timeline"
4448

4549
# Cleanup URL parameters to avoid any ambiguity
50+
request.contest_id = ""
4651
request.participant_id = ""
4752

4853
return self.transport.request(
@@ -54,9 +59,10 @@ def ListScoreTimeline(self, request, **kwargs):
5459
)
5560

5661
def ImportScore(self, request, **kwargs):
57-
path = "/participants/"+urllib.parse.quote(request.participant_id)+"/scores"
62+
path = "/contests/"+urllib.parse.quote(request.contest_id)+"/participants/"+urllib.parse.quote(request.participant_id)+"/scores"
5863

5964
# Cleanup URL parameters to avoid any ambiguity
65+
request.contest_id = ""
6066
request.participant_id = ""
6167

6268
return self.transport.request(
@@ -68,9 +74,10 @@ def ImportScore(self, request, **kwargs):
6874
)
6975

7076
def ExportScore(self, request, **kwargs):
71-
path = "/participants/"+urllib.parse.quote(request.participant_id)+"/scores"
77+
path = "/contests/"+urllib.parse.quote(request.contest_id)+"/participants/"+urllib.parse.quote(request.participant_id)+"/scores"
7278

7379
# Cleanup URL parameters to avoid any ambiguity
80+
request.contest_id = ""
7481
request.participant_id = ""
7582

7683
return self.transport.request(
@@ -82,7 +89,10 @@ def ExportScore(self, request, **kwargs):
8289
)
8390

8491
def RebuildScore(self, request, **kwargs):
85-
path = "/rebuild"
92+
path = "/contests/"+urllib.parse.quote(request.contest_id)+"/rebuild"
93+
94+
# Cleanup URL parameters to avoid any ambiguity
95+
request.contest_id = ""
8696

8797
return self.transport.request(
8898
method="POST",

‎eolymp/judge/score_service_pb2.py‎

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)