예제 #1
0
        public async Task <IEnumerable <BuildDetails> > GetRecentBuildsDetails()
        {
            var builds = new List <BuildDetails>();

            foreach (var config in configs)
            {
                var path     = config.GetRecentBuilds(DateTime.Today.AddSeconds(-30));
                var response = await client.GetAsync(path);

                if (response.IsSuccessStatusCode)
                {
                    var buildDetails = jsonService.DeserializeJson <BuildDetails>(await response.Content.ReadAsStringAsync());
                    builds.AddRange(buildDetails);
                }
            }

            return(builds);
        }