public static RallyRestApi GetRallyRestApiWithApiKey(string apiKey = "",
			string server = RallyRestApi.DEFAULT_SERVER, string wsapiVersion = "")
		{
			if (String.IsNullOrWhiteSpace(apiKey))
			{
				apiKey = Settings.Default.ApiKey;
			}

			RallyRestApi api = new RallyRestApi(webServiceVersion: wsapiVersion);
			RallyRestApi.AuthenticationResult authResult = api.AuthenticateWithApiKey(apiKey, server);
			Assert.AreEqual(RallyRestApi.AuthenticationResult.Authenticated, authResult);
			return api;
		}
        public static RallyRestApi GetRallyRestApiWithApiKey(string apiKey = "",
                                                             string server = RallyRestApi.DEFAULT_SERVER, string wsapiVersion = "")
        {
            if (String.IsNullOrWhiteSpace(apiKey))
            {
                apiKey = Settings.Default.ApiKey;
            }

            RallyRestApi api = new RallyRestApi(webServiceVersion: wsapiVersion);

            RallyRestApi.AuthenticationResult authResult = api.AuthenticateWithApiKey(apiKey, server);
            Assert.AreEqual(RallyRestApi.AuthenticationResult.Authenticated, authResult);
            return(api);
        }
Ejemplo n.º 3
0
        public RallyArtifactsByState LoadArtifactsByState()
        {
            string apiKey    = Environment.GetEnvironmentVariable("RALLY_API_KEY");
            string serverUrl = "https://rally1.rallydev.com";

            var restApi = new RallyRestApi();

            restApi.AuthenticateWithApiKey(apiKey, serverUrl);

            var iterations = QueryIterations(restApi);
            var artifacts  = QueryArtifact(restApi, iterations);

            ProcessResults(artifacts, iterations);

            var artifactsByState = GroupByStates(artifacts, iterations);

            return(artifactsByState);
        }