mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
added a sample script using Octokit
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user