//------------------------------------------------------------------------------ public virtual void BrowseGameLeaderboardListByFilter() { ResponseGameLeaderboardList wrapper = new ResponseGameLeaderboardList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "game-leaderboard/browse/by-filter"; SearchFilter obj = new SearchFilter(); obj.page = Convert.ToInt32(util.GetParamValue(_context, "page")); obj.page_size = Convert.ToInt32(util.GetParamValue(_context, "page-size")); obj.filter = util.GetParamValue(_context, "filter"); GameLeaderboardResult result = api.BrowseGameLeaderboardListByFilter(obj); wrapper.info.Add("total_rows", result.total_rows); wrapper.info.Add("total_pages", result.total_pages); wrapper.info.Add("page", result.page); wrapper.info.Add("page_size", result.page_size); // get data wrapper.data = result.data; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetGameLeaderboardListByUuid() { string _uuid = (string)util.GetParamValue(_context, "uuid"); ResponseGameLeaderboardList wrapper = new ResponseGameLeaderboardList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "game-leaderboard/get/by-uuid"; List<GameLeaderboard> objs = api.GetGameLeaderboardListByUuid( _uuid ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetGameLeaderboardListByCodeByGameIdByProfileId() { string _code = (string)util.GetParamValue(_context, "code"); string _game_id = (string)util.GetParamValue(_context, "game_id"); string _profile_id = (string)util.GetParamValue(_context, "profile_id"); ResponseGameLeaderboardList wrapper = new ResponseGameLeaderboardList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "game-leaderboard/get/by-code/by-game-id/by-profile-id"; List<GameLeaderboard> objs = api.GetGameLeaderboardListByCodeByGameIdByProfileId( _code , _game_id , _profile_id ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetGameLeaderboardListByProfileIdByGameIdByTimestamp() { string _profile_id = (string)util.GetParamValue(_context, "profile_id"); string _game_id = (string)util.GetParamValue(_context, "game_id"); float _timestamp = float.Parse(util.GetParamValue(_context, "timestamp")); ResponseGameLeaderboardList wrapper = new ResponseGameLeaderboardList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "game-leaderboard/get/by-profile-id/by-game-id/by-timestamp"; List<GameLeaderboard> objs = api.GetGameLeaderboardListByProfileIdByGameIdByTimestamp( _profile_id , _game_id , _timestamp ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetGameLeaderboardList() { ResponseGameLeaderboardList wrapper = new ResponseGameLeaderboardList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "game-leaderboard/get"; List<GameLeaderboard> objs = api.GetGameLeaderboardList( ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }