Sha256: deaf20d523692ff9de998a00d660bfc733bea456bd34c9365f4ae72ee3c0884c

Contents?: true

Size: 427 Bytes

Versions: 4

Compression:

Stored size: 427 Bytes

Contents

module PactBroker
  module Api
    module Resources
      module PaginationMethods
        def pagination_options
          if request.query["pageNumber"] || request.query["pageSize"]
            {
              page_number: request.query["pageNumber"]&.to_i || 1,
              page_size: request.query["pageSize"]&.to_i || 100
            }
          else
            {}
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pact_broker-2.107.1 lib/pact_broker/api/resources/pagination_methods.rb
pact_broker-2.107.0 lib/pact_broker/api/resources/pagination_methods.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/api/resources/pagination_methods.rb
pact_broker-2.106.0 lib/pact_broker/api/resources/pagination_methods.rb