From 2446137720c64f0d5f58f57717f7fa5f9a98c8f3 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Fri, 24 Oct 2014 14:26:06 -0700 Subject: [PATCH] added section about getting user data --- docs/getting-started.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/getting-started.md b/docs/getting-started.md index e7b21b24..d0897296 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -40,3 +40,21 @@ Octokit also supports connecting to GitHub Enterprise environments - just provid var ghe = new Uri("https://github.myenterprise.com/"); var client = new GitHubClient(new ProductHeaderValue("my-cool-app"), ghe); ``` + +### Get exploring + +Once you've got that setup, the simplest thing to experiment with is fetching details about a specific user: + +``` +var user = await client.User.Get("shiftkey"); +Console.WriteLine("{0} has {1} public repositories - go check out their profile at {1}", + user.Name, + user.PublicRepos, + user.Url); +``` + +If you've authenticated as a given user, you can query their details directly: + +``` +var user = await client.User.Current(); +``` \ No newline at end of file