Class: FinchAPI::Models::Paging

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/finch-api/models/paging.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count: nil, offset: nil) ⇒ Paging

Returns a new instance of Paging.

Parameters:

  • count (Integer) (defaults to: nil)
  • offset (Integer) (defaults to: nil)


4
# File 'lib/finch-api/models/paging.rb', line 4

def initialize(count: nil, offset: nil, **) = super

Instance Attribute Details

#countInteger?

The total number of elements for the entire query (not just the given page)

Returns:

  • (Integer, nil)


10
# File 'lib/finch-api/models/paging.rb', line 10

optional :count, Integer

#offsetInteger?

The current start index of the returned list of elements

Returns:

  • (Integer, nil)


20
# File 'lib/finch-api/models/paging.rb', line 20

optional :offset, Integer