Files
octokit.net/samples/linqpad-samples/09-issues.linq
Mickaël Derriey 3369a4aea1 Add a build task to validate LINQPad samples (#1551)
* add a build task to run LINQPad samples

* make modifications to the validation of LINQPad samples

* rename the CAKE task to its original name ValidateLINQPadSamples
* rename the LINQPad samples file so they get executed in ordinal order (1, 2, ..., 10 and not 1, 10, 2, ...)

* remove openssl linking in TravisCI when on macOS
2017-01-28 16:29:07 +10:00

32 lines
1.0 KiB
C#

<Query Kind="Program">
<NuGetReference>Octokit</NuGetReference>
<NuGetReference>Octokit.Reactive</NuGetReference>
<NuGetReference>Rx-Main</NuGetReference>
<Namespace>Octokit</Namespace>
<Namespace>Octokit.Reactive</Namespace>
<Namespace>System</Namespace>
<Namespace>System.Reactive.Linq</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
async Task Main(string[] args)
{
var userName = string.Empty;
GitHubClient client = new GitHubClient(new Octokit.ProductHeaderValue("Octokit.Samples"));
userName = "naveensrinivasan";
client.Credentials = new Credentials(Util.GetPassword("github"));
IIssuesClient issuesclient = client.Issue;
var myissues = await issuesclient.GetAllForCurrent();
myissues.Select(m => new { m.Title, m.Body}).Dump();
//var issue = new NewIssue("Test");
//var newissue = await issuesclient.Create(owner,reponame,new NewIssue("Test"));
//
//newissue.Dump();
var allissues = await issuesclient.GetAllForRepository("octokit", "octokit.net");
allissues.Select(a => new { a.Title, a.Body}).Dump();
}