Exemple #1
0
        private static void TestRepositoriesEndPoint(SharpBucketV1 sharpBucket)
        {
            var    repositoriesEndPoint = sharpBucket.RepositoriesEndPoint(accountName, repository);
            var    tags       = repositoriesEndPoint.ListTags();
            var    branches   = repositoriesEndPoint.ListBranches();
            var    mainBranch = repositoriesEndPoint.GetMainBranch();
            string WIKI_PAGE  = "";
            var    wiki       = repositoriesEndPoint.GetWiki(WIKI_PAGE);
            var    newPage    = new Wiki {
                data = "Hello to my new page"
            };
            var newWiki    = repositoriesEndPoint.PostWiki(newPage, "NewPage");
            var changeSet  = repositoriesEndPoint.ListChangeset();
            var change     = changeSet.changesets[4];
            var getChange  = repositoriesEndPoint.GetChangeset(change.node);
            var diffStats  = repositoriesEndPoint.GetChangesetDiffstat(change.node);
            var repoEvents = repositoriesEndPoint.ListEvents();
            var links      = repositoriesEndPoint.ListLinks();
            var newLink    = new SharpBucket.V1.Pocos.Link {
                id = 100
            };
            var newLinkResponse = repositoriesEndPoint.PostLink(newLink);
            var link            = repositoriesEndPoint.GetLink(newLinkResponse.id);

            newLinkResponse.handler.name = "sfsdf";
            var updatedLink = repositoriesEndPoint.PutLink(newLinkResponse);

            repositoriesEndPoint.DeleteLink(updatedLink);
        }
Exemple #2
0
 private static void TestRepositoriesEndPoint(SharpBucketV1 sharpBucket)
 {
     var repositoriesEndPoint = sharpBucket.RepositoriesEndPoint(accountName, repository);
     var tags = repositoriesEndPoint.ListTags();
     var branches = repositoriesEndPoint.ListBranches();
     var mainBranch = repositoriesEndPoint.GetMainBranch();
     string WIKI_PAGE = "";
     var wiki = repositoriesEndPoint.GetWiki(WIKI_PAGE);
     var newPage = new Wiki{data = "Hello to my new page"};
     var newWiki = repositoriesEndPoint.PostWiki(newPage, "NewPage");
     var changeSet = repositoriesEndPoint.ListChangeset();
     var change = changeSet.changesets[4];
     var getChange = repositoriesEndPoint.GetChangeset(change.node);
     var diffStats = repositoriesEndPoint.GetChangesetDiffstat(change.node);
     var repoEvents = repositoriesEndPoint.ListEvents();
     var links = repositoriesEndPoint.ListLinks();
     var newLink = new Link{id = 100};
     var newLinkResponse = repositoriesEndPoint.PostLink(newLink);
     var link = repositoriesEndPoint.GetLink(newLinkResponse.id);
     newLinkResponse.handler.name = "sfsdf";
     var updatedLink = repositoriesEndPoint.PutLink(newLinkResponse);
     repositoriesEndPoint.DeleteLink(updatedLink);
 }