-
-
Save shahriarhossain/c7f34cb4b3a9f3624dad to your computer and use it in GitHub Desktop.
This file contains 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
public class MailChimpReportsOverview | |
{ | |
public async Task<ReportOverview> OverviewAsync(string endpoint) | |
{ | |
private FileLogger logger = new FileLogger(); | |
string content; | |
using (var client = new HttpClient()) | |
{ | |
try | |
{ | |
Authenticate.ClientAuthentication(client); | |
content = await client.GetStringAsync(endpoint).ConfigureAwait(false); | |
} | |
catch (Exception ex) | |
{ | |
logger.log(ex.ToString()); | |
} | |
} | |
return JsonConvert.DeserializeObject<ReportOverview>(content); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment