Example #1
0
        private static string GetPlaceHtml(RequestManager reqManager, int village)
        {
            string url = $"https://sv36.tribalwars.se/game.php?village={village}&screen=place";
            var    res = reqManager.SendGETRequest(url, null, null, false);

            return(RequestManager.GetResponseStringFromResponse(res));
        }
Example #2
0
        private static CQ GetHtml(RequestManager requestManager, int from, int village)
        {
            var url  = $"https://sv36.tribalwars.se/game.php?village={village}&screen=report&mode=attack&from={from}";
            var res  = requestManager.SendGETRequest(url, null, null, false);
            var html = RequestManager.GetResponseStringFromResponse(res);

            return(html);
        }
Example #3
0
        private CQ GetReportHtml(RequestManager requestManager, int village, int reportItemId)
        {
            var url    = $"{Constants.BaseUrl}village={village}&screen=report&mode=all&group_id=-1&view={reportItemId}";
            var res    = requestManager.SendGETRequest(url, null, null, false);
            var resStr = RequestManager.GetResponseStringFromResponse(res);

            return(resStr);
        }
Example #4
0
        private static List <UnitQueueItem> GetActiveQueue(RequestManager reqManager, int village, BuildingTypes building)
        {
            var typeStr    = BuildingHelper.GetNameForType(building);
            var url        = $"https://sv36.tribalwars.se/game.php?village={village}&screen={typeStr}";
            var res        = reqManager.SendGETRequest(url, null, null, true);
            CQ  htmlString = RequestManager.GetResponseStringFromResponse(res);
            var list       = htmlString
                             .Select($"#trainqueue_wrap_{typeStr} tbody tr")
                             .Where(ele => ele.ClassName.Length > 0)
                             .Select(ele => GetUnitQueueItem(ele, typeStr));

            return(list.ToList());
        }