示例#1
0
        //------------------------------------------------------------------------------
        public virtual void BrowseGameListByFilter()
        {
            ResponseGameList wrapper = new ResponseGameList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game/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");

            GameResult result = api.BrowseGameListByFilter(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);
        }
示例#2
0
        //------------------------------------------------------------------------------
        public virtual void GetGameListByOrgIdByAppId()
        {
            string _org_id = (string)util.GetParamValue(_context, "org_id");
            string _app_id = (string)util.GetParamValue(_context, "app_id");

            ResponseGameList wrapper = new ResponseGameList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game/get/by-org-id/by-app-id";

            List<Game> objs = api.GetGameListByOrgIdByAppId(
                _org_id
                , _app_id
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
示例#3
0
        //------------------------------------------------------------------------------
        public virtual void GetGameListByUuid()
        {
            string _uuid = (string)util.GetParamValue(_context, "uuid");

            ResponseGameList wrapper = new ResponseGameList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game/get/by-uuid";

            List<Game> objs = api.GetGameListByUuid(
                _uuid
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }
示例#4
0
        //------------------------------------------------------------------------------
        public virtual void GetGameList()
        {
            ResponseGameList wrapper = new ResponseGameList();
            wrapper.message = "Success";
            wrapper.code = 0;
            wrapper.action = "game/get";

            List<Game> objs = api.GetGameList(
            );

            // get data
            wrapper.data = objs;

            util.SerializeTypeToResponse(_format, _context, wrapper);
        }