Created
May 31, 2018 20:02
-
-
Save GrillPhil/c1c0babc57f6fba95ba71291885c18c4 to your computer and use it in GitHub Desktop.
Step 3
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
var httpClient = new HttpClient(); | |
var tenant = config["Tenant"]; | |
var apiKey = config["ApiKey"]; | |
var baseUrl = config["BaseUrl"]; | |
var requestUrl = string.Format(baseUrl, tenant, "projects.json?", apiKey); | |
var response = await httpClient.GetStringAsync(requestUrl); | |
var projects = (JsonConvert.DeserializeObject<IEnumerable<ProjectWrapper>>(response)).Select(wrapper => wrapper.Project); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment