public async Task CompanyUsersTest() { ProcoreApiClient apiClient = this.GetApiClient(); var companies = await apiClient.GetResponseAsync(new ListCompaniesRequest()); foreach (var c in companies.Result) { var usersResponse = await apiClient.GetResponseAsync(new ListCompanyUsersRequest { CompanyId = c.Id }); } }
public async Task InspectionChecklistTemplateTest() { ProcoreApiClient apiClient = this.GetApiClient(); var companies = await apiClient.GetResponseAsync(new ListCompaniesRequest()); foreach (var c in companies.Result) { var projectResponse = await apiClient.GetResponseAsync(new ListProjectsRequest { CompanyId = c.Id }); foreach (var p in projectResponse.Result) { var inspectionChecklistResponse = await apiClient.GetResponseAsync(new ListChecklistTemplatesRequest { ProjectId = p.Id }); } } }
public static Task <ProcoreResponse <TModel> > GetResponse <TModel>(this ProcoreRequest <TModel> request, ProcoreApiClient client) { return(client.GetResponseAsync <TModel>(request)); }
public async Task CompaniesTest() { ProcoreApiClient apiClient = this.GetApiClient(); var companies = await apiClient.GetResponseAsync(new ListCompaniesRequest()); }