clio/zapier-api-client — pull request #3 by alecclarke (2014-07-23 23:36:11+00:00)
Title: new_contact_post_poll, populates and returns an  array with all the clio...

In Zapier developer the Polling URL route is set to https://app.goclio.com/api/v2/contacts?limit=1&order_dir=desc

new_contact_post_poll takes the single contact that is originally returned and appends it to the return array. Inside a while loop get request are sent to the Clio API contacts end-point referencing the next_offset of the previous request as the offset of the current request. The limit is currently 2 to test functionality. The loop is exited when the return values no longer equal the limit.

**Not sure this is the most efficient way to do so, but i couldn't think of another way to store next_offset values without a loop and internal poll requests