Beispiel #1
0
        public async Task<ActionResult> QuestDetail(long id)
        {
            var searcher = new WowheadClient();
            var quest = await searcher.GetQuest(id);


            var viewModel = new QuestDetailViewModel()
            {
                Id = quest.Id,
                Comments = quest.Comments,
                Name = quest.Name,
            };

            return View(viewModel);
        }
Beispiel #2
0
        public async Task<ActionResult> Search(string questText, bool? alliance, bool? horde)
        {
            var search = new QuestQuery()
            {
                Text = questText,
            };

            if (alliance == true)
                search.FactionSide = FactonSide.Alliance;
            else if (horde == true)
                search.FactionSide = FactonSide.Horde;

            var searcher = new WowheadClient();
            var quests = await searcher.SearchQuests(search);
            var viewModel = new QuestSearchViewModel()
            {
                SearchExpression = questText,
                Quests = quests,
            };
            return View(viewModel);
        }