Created
April 23, 2015 16:15
-
-
Save jptoto/534ef3bf6400d12b36a5 to your computer and use it in GitHub Desktop.
Get Bounces Async
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
using System; | |
using System.Collections.Generic; | |
using System.Runtime.Remoting.Channels; | |
using System.Threading.Tasks; | |
using System.Xml; | |
using PostmarkDotNet; | |
namespace ConsolePostmarkLibTester | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
MyMethod(); | |
} | |
public static async Task MyMethod() | |
{ | |
Task<PostmarkBounces> bouncesTask = GetTheBouncesAsync(); | |
var results = bouncesTask.Result; | |
results.GetType(); | |
} | |
public static async Task<PostmarkBounces> GetTheBouncesAsync() | |
{ | |
PostmarkClient client = new PostmarkClient("API_KEY"); | |
PostmarkBounces bounces = await client.GetBouncesAsync(0, 100); | |
return bounces; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment