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; }
private static void TestApiV2() { var sharpBucket = new SharpBucketV2(); ReadTestDataOauth(); sharpBucket.OAuth2LeggedAuthentication(consumerKey, consumerSecretKey); //TestUsersEndPoint(sharpBucket); //TestTeamsEndPoint(sharpBucket); TestRestRepositoriesEndPoint(sharpBucket); }