MahjongRepository / mahjong_soul_api

Python wrapper for the Mahjong Soul (Majsoul) Protobuf objects. It allows to use their API.
72 stars 10 forks source link

help me #21

Closed icnsnker closed 11 months ago

icnsnker commented 11 months ago

async def load_GameRecord_List(manager_api): logging.info("Loading GameRecord list...")

req = pb.ReqFetchCustomizedContestGameRecordList()
#req.last_index = 1
res = await manager_api.fetch_contest_game_records(req)
logging.info(res)
return True

In fetchContestGameRecords req is ReqFetchCustomizedContestGameRecordList

ReqFetchCustomizedContestGameRecordList : last_index int

No matter what value is assigned to last_index or None, error code=2501 will always be returned.

I'm really confused. Could you please give me some guidance?

unStatiK commented 11 months ago

@icnsnker , Hello, thanks for interest our software!

To get contest's records firstly you should enter it.

req = pb.ReqManageContest()
req.unique_id = <your_contest_unique_id>  // at the end of the URL of the tournament management panel
res = await manager_api.manage_contest(req)

Then you can success load contest's records without error code 2501

req = pb.ReqFetchCustomizedContestGameRecordList()
res = await manager_api.fetch_contest_game_records(req)