// TODO: Doesnt work, 500 server error, same for put /// <summary> /// Creates a new wiki page. /// </summary> /// <param name="newPage">Title of the page.</param> /// <param name="location">Path to the page.</param> /// <returns></returns> public Wiki PostWiki(Wiki newPage, string location) { var overrideUrl = _baserUrl + "wiki/" + location; return _sharpBucketV1.Post(newPage, overrideUrl); }
/// <summary> /// Updates an existng wiki page. /// </summary> /// <param name="updatedPage">Title of the page.</param> /// <param name="location">Path to the page.</param> /// <returns></returns> public Wiki PutWiki(Wiki updatedPage, string location) { var overrideUrl = _baserUrl + "wiki/" + location; return _sharpBucketV1.Put(updatedPage, overrideUrl); }
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); }