def getTopN(self, rankingId, issueNumber, topN): ''' 获取topN @return: [userId1, score1, userId2, score2,...] ''' return daobase.executeRankLua(self._get_topn_alias, 3, rankingId, issueNumber, topN)
def setUserScore(self, rankingId, issueNumber, userId, score, totalN): ''' 设置用户积分 @return: rank ''' return daobase.executeRankLua(self._set_user_score_alias, 5, rankingId, issueNumber, userId, score, totalN)
def getUserRankWithScore(self, rankingId, issueNumber, userId): ''' 获取用户排名和积分 @return: (rank, score) ''' return daobase.executeRankLua(self._get_user_alias, 3, rankingId, issueNumber, userId)
def removeUser(self, rankingId, issueNumber, userId): ''' 删除用户 ''' return daobase.executeRankLua(self._remove_user_alias, 3, rankingId, issueNumber, userId) > 0
def getTopN(self, rankingId, issueNumber, topN): ''' 获取topN @return: [userId1, score1, userId2, score2,...] ''' return daobase.executeRankLua(self._get_topn_alias, 3, rankingId, issueNumber, topN)
def getUserRankWithScore(self, rankingId, issueNumber, userId): ''' 获取用户排名和积分 @return: (rank, score) ''' return daobase.executeRankLua(self._get_user_alias, 3, rankingId, issueNumber, userId)
def setUserScore(self, rankingId, issueNumber, userId, score, totalN): ''' 设置用户积分 @return: rank ''' return daobase.executeRankLua(self._set_user_score_alias, 5, rankingId, issueNumber, userId, score, totalN)
def removeUser(self, rankingId, issueNumber, userId): ''' 删除用户 ''' return daobase.executeRankLua(self._remove_user_alias, 3, rankingId, issueNumber, userId) > 0