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)); }
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); }
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); }
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()); }