Exemplo n.º 1
0
        public static OnlineLevel GetLevel(GetGjLevelsSettings settings)
        {
            var req = new GetGjLevels(settings);

            req.Perform();

            var result = req.Result.FirstOrDefault();

            if (result != null)
            {
                var req2 = new DownloadGjLevel(result.ID);
                req2.Perform();

                var level = req2.Result;

                level.Description = fromBase64(level.DescB64);

                var levelData = new Level(level.Title, level.Description, level.LevelString, "");
                level.Level = levelData;

                return(level);
            }

            return(null);
        }
Exemplo n.º 2
0
        public static List <OnlineLevel> GetLevels(GetGjLevelsSettings settings)
        {
            var req = new GetGjLevels(settings);

            req.Perform();

            var result = req.Result;
            List <OnlineLevel> levels = new List <OnlineLevel>();

            foreach (var level in result)
            {
                if (level != null)
                {
                    level.Description = fromBase64(level.DescB64);

                    levels.Add(level);
                }
            }

            return(levels);
        }