estately / rets

A pure-ruby library for fetching data from RETS servers
https://github.com/estately/rets
127 stars 94 forks source link

Handling Pagination #199

Closed leehumeniuk closed 8 years ago

leehumeniuk commented 8 years ago

The system I'm connecting to limits the amount of listings returned to 100. I know that there are about 11,000 total. If the system wants to return more than 100 listings, then the xml comes with a pagination tag that gives the number of pages and the offset, etc.

Is there functionality to loop and request the rest of the pages?

Thanks!

dougcole commented 8 years ago

The #find method takes a :offset and :limit keys in the options hash. That should do what you're looking for.

gnazarkin commented 7 years ago

Is there a way to get the pagination tag using the client? If not how did you handle it @leehumeniuk? Or did you just make a manual query not using the client and then use the client to get the records? Thanks in advance