Method: Parse::API::Aggregate#aggregate_objects

Defined in:
lib/parse/api/aggregate.rb

#aggregate_objects(className, query = {}, headers: {}, **opts) ⇒ Parse::Response

Aggregate a set of matching objects for a query.

Parameters:

  • className (String)

    the name of the Parse collection.

  • query (Hash) (defaults to: {})

    The set of query constraints.

  • opts (Hash)

    additional options to pass to the Client request.

  • headers (Hash) (defaults to: {})

    additional HTTP headers to send with the request.

Returns:

See Also:



52
53
54
55
56
# File 'lib/parse/api/aggregate.rb', line 52

def aggregate_objects(className, query = {}, headers: {}, **opts)
  response = request :get, aggregate_uri_path(className), query: query, headers: headers, opts: opts
  response.parse_class = className if response.present?
  response
end