Ejemplo n.º 1
0
        public async Task <Root> GetWakaTimeUserSummary(string project)
        {
            var summaryDate = DateTime.Now.ToString("yyyy-MM-dd");
            var httpClient  = _httpClientProvider.GetWakaTimeClient();
            var requestUrl  = $"?api_key={_userOptions.WakaTimeOptions.ApiKey}&project={project}&start={summaryDate}&end={summaryDate}";
            var response    = await httpClient.GetAsync(requestUrl);

            var stringResponseBody = await response.Content.ReadAsStringAsync();

            return(JsonConvert.DeserializeObject <Root>(stringResponseBody));
        }