/// <summary> /// Gets the deployments page asynchronously. /// </summary> /// <param name="environment">The environment.</param> /// <param name="pageNumber">The page number.</param> /// <returns></returns> public async Task <IDeploymentDetails[]> GetDeploymentsPageAsync(string environment, int pageNumber) { Assumption.AssertNotNullOrWhiteSpace(this._readAccessToken, nameof(this._readAccessToken)); var config = new RollbarConfig(this._readAccessToken); RollbarClient rollbarClient = new RollbarClient(config); var result = await rollbarClient.GetDeploymentsAsync(this._readAccessToken, pageNumber); return(result.DeploysPage.Deploys); }
public void TestGetDeploysPage() { RollbarClient rollbarClient = new RollbarClient(this._loggerConfig); var task = rollbarClient.GetDeploymentsAsync(RollbarUnitTestSettings.DeploymentsReadAccessToken, 1); task.Wait(TimeSpan.FromSeconds(3)); Assert.IsNotNull(task.Result); Assert.AreEqual(task.Result.ErrorCode, 0); Assert.IsNotNull(task.Result.DeploysPage); Assert.IsTrue(task.Result.DeploysPage.PageNumber > 0); }