pygomx: fixes
This commit is contained in:
parent
9bae928f63
commit
067749823b
2 changed files with 6 additions and 3 deletions
|
|
@ -80,7 +80,7 @@ class _AsyncClient:
|
||||||
r = ApiV0Api.sendmessage(self.client_id, data_dict)
|
r = ApiV0Api.sendmessage(self.client_id, data_dict)
|
||||||
return CheckApiResult(r)
|
return CheckApiResult(r)
|
||||||
|
|
||||||
def leaveroom(self, roomid):
|
async def leaveroom(self, roomid):
|
||||||
r = ApiV0Api.leaveroom(self.client_id, roomid)
|
r = ApiV0Api.leaveroom(self.client_id, roomid)
|
||||||
CheckApiError(r)
|
CheckApiError(r)
|
||||||
|
|
||||||
|
|
@ -88,9 +88,10 @@ class _AsyncClient:
|
||||||
r = ApiV0Api.joinedrooms(self.client_id)
|
r = ApiV0Api.joinedrooms(self.client_id)
|
||||||
return CheckApiResult(r)
|
return CheckApiResult(r)
|
||||||
|
|
||||||
def _createroom(self, data_dict):
|
async def createroom(self, data_dict):
|
||||||
r = ApiV0Api.createroom(self.client_id, data_dict)
|
r = ApiV0Api.createroom(self.client_id, data_dict)
|
||||||
return CheckApiError(r)
|
return CheckApiResult(r)
|
||||||
|
|
||||||
|
|
||||||
def process_event(self, evt):
|
def process_event(self, evt):
|
||||||
if hasattr(self, "on_event") and callable(self.on_event):
|
if hasattr(self, "on_event") and callable(self.on_event):
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ def CheckApiErrorOnly(rstr):
|
||||||
if rstr.startswith("ERR:"):
|
if rstr.startswith("ERR:"):
|
||||||
raise PygomxAPIError(rstr)
|
raise PygomxAPIError(rstr)
|
||||||
|
|
||||||
|
return rstr
|
||||||
|
|
||||||
|
|
||||||
def CheckApiError(rstr):
|
def CheckApiError(rstr):
|
||||||
if rstr.startswith("ERR:"):
|
if rstr.startswith("ERR:"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue