def getOsuBeatMap(self, bid): """取osu beatmap信息 Args: bid """ ret = cmdRouter.invoke('!beatmap', {"bid": bid}) return json.loads(ret)
def getOsuInfoFromAPI(self, osuid): """取osu用户信息 通过ppy Args: osuid """ ret = cmdRouter.invoke('!osuerinfo', {"osuid": osuid}) return json.loads(ret)
def getOsuFile(self, bid): """取osu文件,做存储 Args: bid """ ret = cmdRouter.invoke('!osufile', {"bid": bid}) return json.loads(ret)
def getSkillInfo(self, osuname): """取osu skill信息 Args: osuname """ ret = cmdRouter.invoke('!osuskill', {"osuname": osuname}) return ret
def getOsuInfo(qqid): """取osu用户绑定信息 Args: qq/groupid """ ret = cmdRouter.invoke('!uinfo2', {"qqid": qqid}) return json.loads(ret)
def getOppaiInfo(self, bid, extend=''): """取oppai结果 Args: bid extend 附加条件 参考git """ ret = cmdRouter.invoke('!oppai', {"bid": bid, "extend": extend}) return json.loads(ret)
def getSkillvsInfo(self, osuname, vsosuname): """取osu skill vs信息 Args: osuname vsosuname """ ret = cmdRouter.invoke('!osuskillvs', {"osuname": osuname, "vsosuname": vsosuname}) return ret
def getRecBp(self, osuid, limit): """取osu用户bp信息 Args: osuid limit """ ret = cmdRouter.invoke( '!bp', {"osuid": osuid, "limit": limit} ) return json.loads(ret)
def getRecInfo(self, osuid, limit): """取osu用户rec信息 Args: osuid limit """ ret = cmdRouter.invoke( '!rec', {"osuid": osuid, "limit": limit} ) return json.loads(ret)
def bindOsuUser(self, osuid, qq, groupid): """用户绑定 Args: osuid id/name Return: 1 成功 0 重复 -1 异常 -2 请求api异常 """ ret = cmdRouter.invoke('!osuerinfo', {"osuid": osuid}) uinfo = json.loads(ret) if not uinfo: return -2 r = self.user2DB(qq, uinfo[0]['user_id'], groupid, uinfo[0]['username']) return r
def callbackMain(callbackcmd, args): cmdRouter.invoke(callbackcmd, args)