Sha256: 27099de51818ab5977f466db4b5bffda03f85bc33bb43a56f048342247d4fa60

Contents?: true

Size: 751 Bytes

Versions: 194

Compression:

Stored size: 751 Bytes

Contents

# frozen_string_literal: true

module Motor
  module ApiQuery
    module_function

    def call(rel, params)
      rel = ApiQuery::Sort.call(rel, params[:sort] || params[:order])
      rel = ApiQuery::Paginate.call(rel, params[:page])
      rel = ApiQuery::Filter.call(rel, params[:filter] || params[:filters])
      rel = ApiQuery::ApplyScope.call(rel, params[:scope])

      ApiQuery::Search.call(rel, params[:q] || params[:search] || params[:query])
    end
  end
end

require_relative './api_query/sort'
require_relative './api_query/paginate'
require_relative './api_query/filter'
require_relative './api_query/search'
require_relative './api_query/apply_scope'
require_relative './api_query/build_meta'
require_relative './api_query/build_json'

Version data entries

194 entries across 194 versions & 6 rubygems

Version Path
motor-admin-0.4.34 lib/motor/api_query.rb
motor-admin-0.4.33 lib/motor/api_query.rb
motor-admin-0.4.32 lib/motor/api_query.rb
motor-admin-0.4.31 lib/motor/api_query.rb
motor-admin-0.4.30 lib/motor/api_query.rb
motor-admin-0.4.29 lib/motor/api_query.rb
motor-admin-0.4.28 lib/motor/api_query.rb
motor-admin-0.4.27 lib/motor/api_query.rb
motor-admin-unosquare-0.4.28 lib/motor/api_query.rb
motor-admin-unosquare-0.4.27 lib/motor/api_query.rb
motor-admin-pz-0.4.26 lib/motor/api_query.rb
motor-admin-0.4.26 lib/motor/api_query.rb
motor-admin-0.4.25 lib/motor/api_query.rb
motor-admin-0.4.24 lib/motor/api_query.rb
motor-admin-0.4.23 lib/motor/api_query.rb
motor-admin-pz-0.4.22 lib/motor/api_query.rb
motor-admin-0.4.22 lib/motor/api_query.rb
motor-admin-pz-0.4.21 lib/motor/api_query.rb
motor-admin-0.4.21 lib/motor/api_query.rb
motor-admin-0.4.20 lib/motor/api_query.rb