コード例 #1
0
ファイル: TestHelpers.cs プロジェクト: 0x1mason/SharpBucket
 public static SharpBucketV2 GetV2ClientAuthenticatedWithOAuth()
 {
     var sharpbucket = new SharpBucketV2();
      // Reads test data information from a file, you should structure it like this:
      // By default it reads from c:\
      // ApiKey:yourApiKey
      // SecretApiKey:yourSecretApiKey
      // AccountName:yourAccountName
      // Repository:testRepository
      var lines = File.ReadAllLines("c:\\TestInformationOauth.txt");
      var consumerKey = lines[0].Split(':')[1];
      var consumerSecretKey = lines[1].Split(':')[1];
      sharpbucket.OAuth2LeggedAuthentication(consumerKey, consumerSecretKey);
      return sharpbucket;
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: 0x1mason/SharpBucket
 private static void TestApiV2()
 {
     var sharpBucket = new SharpBucketV2();
     ReadTestDataOauth();
     sharpBucket.OAuth2LeggedAuthentication(consumerKey, consumerSecretKey);
     //TestUsersEndPoint(sharpBucket);
     //TestTeamsEndPoint(sharpBucket);
     TestRestRepositoriesEndPoint(sharpBucket);
 }