Created
May 31, 2018 20:20
-
-
Save GrillPhil/a32c8299cd7de21302898e9e6b3f3f96 to your computer and use it in GitHub Desktop.
Step 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static async Task<IEnumerable<TimeEntry>> GetTimeEntriesForProject(HttpClient httpClient, string tenant, string apiKey, string baseUrl, int projectId) | |
{ | |
var requestUrl = string.Format(baseUrl, tenant, $"time_entries.json?project_id={projectId}&", apiKey); | |
var response = await httpClient.GetStringAsync(requestUrl); | |
return (JsonConvert.DeserializeObject<IEnumerable<TimeEntryWrapper>>(response)).Select(wrapper => wrapper.TimeEntry); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment