public static SharpBucketV2 GetV2ClientAuthenticatedWithOAuth1() { var sharpBucket = new SharpBucketV2(); sharpBucket.OAuth1TwoLeggedAuthentication(OAuthConsumerKey, OAuthConsumerSecretKey); return(sharpBucket); }
public void OAuth1TwoLeggedAuthentication_AllowToListPrivateRepositories() { var privateRepo = SampleRepositories.PrivateTestRepository.GetRepository(); var sharpBucket = new SharpBucketV2(); sharpBucket.OAuth1TwoLeggedAuthentication(TestHelpers.OAuthConsumerKey, TestHelpers.OAuthConsumerSecretKey); var accountRepos = sharpBucket.RepositoriesEndPoint().ListRepositories(TestHelpers.AccountName); accountRepos.ShouldNotBe(null); accountRepos.Any(p => p.is_private == true && p.name == privateRepo.name).ShouldBe(true); }