added section about getting user data

This commit is contained in:
Brendan Forster
2014-10-24 14:26:06 -07:00
parent 395a41a531
commit 2446137720
+18
View File
@@ -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();
```