anchor.diff:  
   def paginated_get(path, options = {})
     params  = options.dup
  -  page    = params.delete(:page) { 1 }
  -  limit   = params.fetch(:limit) { 50 }
  +  before  = nil
  +  max     = params.delete(:max) { 1000 }
  +  limit   = params.delete(:limit) { 50 }
     results = []
   
     loop do
  -    data = get(path, { page: page }.merge(params))
  -
  -    page += 1
  +    data = get(path, { before: before, limit: limit }.merge(params))
  +
       results += data
   
  -    break if (data.empty? || page * limit >= MAX)
  +    break if (data.empty? || results.length >= max)
  +
  +    before = data.last["id"]
     end
   
     results
   end
   ```
   
  -Given a path and hash of parameter options, we'll build up an array of results by fetching the endpoint and incrementing the page number each time. Once either the max is reached or no more results are returned from the API, we'll exit the loop.
  +Given a path and hash of parameter options, we'll build up an array of results by fetching the endpoint and requesting the next set of 50 before the last id of the previos set. Once either the max is reached or no more results are returned from the API, we'll exit the loop.
   
   As a starting point, this works nicely. We can simply use `paginated_get` to collect up to 1000 results for a given resource without the caller caring about pages. Here's how we can grab the all the comments we've added to Trello cards:
   
  
positive.code: def paginated_get(path, options = {})
    Enumerator.new do |y|
      params  = options.dup
      page    = params.delete(:page) { 1 }
      limit   = params.fetch(:limit) { 50 }
  
      loop do
        data = get(path, { page: page }.merge(params))
  
        data.each do |element|
          y.yield element
        end
  
        break if (data.empty? || page * limit >= MAX)
  
        page += 1
      end
    end
  end
  
negative.code: 
  ***
  
  Changelog
  
  2016-01-28 - Updated the examples to use the `:before` parameter instead of `:page` for requests for successive "pages"
             - Posted the [full source of the examples above on GitHub](https://github.com/rossta/loves-enumerable/tree/master/examples/paginated_resources)
  
  ***
  
  ### Credits
  
  Icons via the [Noun Project](https://thenounproject.com/):
  