added a sample script using Octokit

This commit is contained in:
Brendan Forster
2016-01-27 12:19:59 +10:30
parent 47e06b5300
commit 64a0cda80c
4 changed files with 108 additions and 21 deletions
+4 -4
View File
@@ -35,7 +35,7 @@ It is **strongly recommended** to use the [OAuth Flow](https://github.com/octoki
When authenticated, you have 5000 requests per hour available. So this is the recommended approach for interacting with the API.
### Connecting to GitHub Enterprise
### Connect to GitHub Enterprise
Octokit also supports connecting to GitHub Enterprise environments - just provide the URL to your GitHub Enterprise server when creating the client.
@@ -44,11 +44,11 @@ var ghe = new Uri("https://github.myenterprise.com/");
var client = new GitHubClient(new ProductHeaderValue("my-cool-app"), ghe);
```
### Get exploring
### Get some data
Once you've got that setup, the simplest thing to experiment with is fetching details about a specific user:
Once you have that setup, the simplest thing to experiment with is fetching details about a specific user:
```
```csharp
var user = await client.User.Get("shiftkey");
Console.WriteLine("{0} has {1} public repositories - go check out their profile at {2}",
user.Name,