As per Procore's documentation, we can only request 300 projects per page and since we can only query one page that means 300 projects per request. This could mean that we don't find all the projects within a company. We need to build in a while to continue requesting until all projects have been pulled and combine the data in a useful way. I am thinking something like:
continually send the GET request updating the page number each time
get the length of the response
if the length of the response is < the per_page that is specified, move on else send the GET request again
have variable that updates with all the response per iteration
combine the appended data in a way that doesn't break what we already have 🔨
As per Procore's documentation, we can only request 300 projects per page and since we can only query one page that means 300 projects per request. This could mean that we don't find all the projects within a company. We need to build in a while to continue requesting until all projects have been pulled and combine the data in a useful way. I am thinking something like:
per_page
that is specified, move on else send the GET request again