module Github::Pagination
def auto_paginate(auto=false)
instances or just per given request.
By default this is off. You can set it on the client, individual API
using this feature - 100 pages iteration will perform 100 API calls.
until all pages are exhausted. Caution needs to be exercised when
Iterate over results set pages by automatically calling `next_page`
def auto_paginate(auto=false) if (current_api.auto_pagination? || auto) && self.body.is_a?(Array) resources_bodies = [] each_page { |resource| resources_bodies += resource.body } self.body = resources_bodies end self end