mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 11:05:56 +00:00
added section about getting user data
This commit is contained in:
@@ -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();
|
||||
```
|
||||
Reference in New Issue
Block a user