Skip to content

Instantly share code, notes, and snippets.

@jptoto
Created April 23, 2015 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jptoto/534ef3bf6400d12b36a5 to your computer and use it in GitHub Desktop.
Save jptoto/534ef3bf6400d12b36a5 to your computer and use it in GitHub Desktop.
Get Bounces Async
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