Created
September 6, 2012 12:15
-
-
Save benfoster/3655639 to your computer and use it in GitHub Desktop.
Consuming my ASP.NET Web API client
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
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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks cool :)