public void TestGetDeploy() { RollbarClient rollbarClient = new RollbarClient(this._loggerConfig); var task = rollbarClient.GetDeploymentAsync(RollbarUnitTestSettings.DeploymentsReadAccessToken, "8387647"); task.Wait(TimeSpan.FromSeconds(3)); Assert.IsNotNull(task.Result); Assert.AreEqual(task.Result.ErrorCode, 0); Assert.IsNotNull(task.Result.Deploy); Assert.IsTrue(!string.IsNullOrWhiteSpace(task.Result.Deploy.DeployID)); }
/// <summary> /// Gets the deployment asynchronously. /// </summary> /// <param name="deploymentID">The deployment identifier.</param> /// <returns></returns> public async Task <IDeploymentDetails> GetDeploymentAsync(string deploymentID) { Assumption.AssertNotNullOrWhiteSpace(deploymentID, nameof(deploymentID)); Assumption.AssertNotNullOrWhiteSpace(this._readAccessToken, nameof(this._readAccessToken)); var config = new RollbarConfig(this._readAccessToken); RollbarClient rollbarClient = new RollbarClient(config); var result = await rollbarClient.GetDeploymentAsync(this._readAccessToken, deploymentID); return(result.Deploy); }