Пример #1
0
        static void Main ()
        {
        	//TestPullRequest ();

            var user = new User (new BasicCacher.BasicCacher (), new SimpleLogProvider ());
        	var u = user.Get ("rumpl");
        	Console.WriteLine (u.Blog);
        	u = user.Get ("rumpl");
        	Console.WriteLine (u.Blog);
   
        	user.Authenticate (new GithubSharp.Core.Models.GithubUser { Name = "erikzaadi", APIToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX" });
        	try
            {
        		var privateuser = user.Get ();
        		if (privateuser == null)
        			throw new Exception ("Invalid user");
        	}
			catch (Exception e)
			{
        		Console.WriteLine (e.Message);
			}
			
			
            var issuesAPI = new Issues(new BasicCacher.BasicCacher(), new SimpleLogProvider());

            var closedIssues = issuesAPI.List("GithubSharp", "erikzaadi", GithubSharp.Core.Models.IssueState.Closed);
            var openIssues = issuesAPI.List("GithubSharp", "erikzaadi", GithubSharp.Core.Models.IssueState.Open);


            Console.ReadKey();
        }
Пример #2
0
        static void Main()
        {
            TestPullRequest();

            var user = new User(new BasicCacher.BasicCacher(), new SimpleLogProvider());
            var u = user.Get("rumpl");
            Console.WriteLine(u.Blog);
            u = user.Get("rumpl");
            Console.WriteLine(u.Blog);

            var issuesAPI = new Issues(new BasicCacher.BasicCacher(), new SimpleLogProvider());

            var closedIssues = issuesAPI.List("GithubSharp", "erikzaadi", GithubSharp.Core.Models.IssueState.Closed);
            var openIssues = issuesAPI.List("GithubSharp", "erikzaadi", GithubSharp.Core.Models.IssueState.Open);

            Console.ReadKey();
        }
Пример #3
0
 public Issues GetIssuesApi()
 {
     var issues = new Issues(_basicCacher, _logger);
     issues.Authenticate(GithubUser);
     return issues;
 }