File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
servercom/implementations Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ def get_status(self) -> GameStatus:
387387 resp_json = loads (resp [1 ])
388388 if self .v :
389389 print (f"It is { resp_json ['unix_time' ]} seconds since the epoch." )
390- return GameStatus (resp_json ['unix_time' ], resp_json ['status' ]['score' ], resp_json [ 'status' ][ 'strikes ' ])
390+ return GameStatus (Time ( resp_json ['unix_time' ]) , resp_json ['status' ]['score' ])
391391
392392 def post (self , point : DataPoint ) -> bool :
393393 if self .v :
Original file line number Diff line number Diff line change 1414
1515
1616GameStatus = namedtuple ("GameStatus" ,
17- ['unix_time' ,
18- 'score' ,
19- 'strikes' ]
17+ ['time' ,
18+ 'score' ]
2019)
2120
2221HTTPResponse = namedtuple ("HTTPResponse" ,
Original file line number Diff line number Diff line change 11"""CPython implementation of the CubeServer API Wrapper Library"""
22
33from .common import *
4+ from ..timetools import Time
45
56import ssl
67import socket
@@ -340,7 +341,7 @@ def request(
340341 def get_status (self ) -> GameStatus :
341342 resp = self .request ('GET' , '/status' )
342343 resp_json = loads (resp [1 ])
343- return GameStatus (resp_json ['unix_time' ], resp_json ['status' ]['score' ], resp_json [ 'status' ][ 'strikes ' ])
344+ return GameStatus (Time ( resp_json ['unix_time' ]) , resp_json ['status' ]['score' ])
344345
345346 def post (self , point : DataPoint ) -> bool :
346347 return self .request (
You can’t perform that action at this time.
0 commit comments