Method: Airtable::Table#records

Defined in:
lib/airtable/table.rb

#records(options = {}) ⇒ Object

Fetch records from the sheet given the list options Options: limit = 100, offset = “as345g”, sort = [“Name”, “asc”] records(:sort => [“Name”, :desc], :limit => 50, :offset => “as345g”)



24
25
26
27
28
# File 'lib/airtable/table.rb', line 24

def records(options={})
  options["sortField"], options["sortDirection"] = options.delete(:sort) if options[:sort]
  results = self.class.get(worksheet_url, query: options).parsed_response
  RecordSet.new(results)
end