예제 #1
0
        static void Main()
        {
            //TestPullRequest ();

            var user = new User(new BasicCacher.BasicCacher(), new SimpleLogProvider());


            user.Authenticate(new GithubSharp.Core.Models.GithubUser {
                Name = "AleksMorozova", APIToken = "f1870a94856b1d74f844db3a03863e949309a66f"
            });
            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("Gruvo", "AleksMorozova", GithubSharp.Core.Models.IssueState.Closed);
            var openIssues   = issuesAPI.List("Gruvo", "AleksMorozova", 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
        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();
        }