Skip to content

Instantly share code, notes, and snippets.

@benfoster
Created September 6, 2012 12:15
Show Gist options
  • Save benfoster/3655639 to your computer and use it in GitHub Desktop.
Save benfoster/3655639 to your computer and use it in GitHub Desktop.
Consuming my ASP.NET Web API client
static void Main(string[] args)
{
var configuration = ClientConfiguration.Initialize(configure =>
{
configure.WithApiKey("1234-5678");
configure.WithBaseUri("http://localhost.fiddler:64511");
configure.WithSiteId(1);
});
var pages = configuration.GetPagesClient();
foreach (var page in pages.GetPages(configuration.SiteId).Result.Items)
{
Console.WriteLine("{0} - {1}", page.Title, page.GetSelfLink());
}
Console.ReadLine();
}
@alexbeletsky
Copy link

Looks cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment