Method: Runcible::Resources::Repository#unit_search

Defined in:
lib/runcible/resources/repository.rb

#unit_search(id, criteria = {}) ⇒ RestClient::Response

Searches the repository for units based on criteria

Parameters:

  • id (String)

    the id of the repository

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

    criteria object containing Mongo syntax

Returns:

  • (RestClient::Response)


146
147
148
# File 'lib/runcible/resources/repository.rb', line 146

def unit_search(id, criteria = {})
  call(:post, "#{path(id)}search/units/", :payload => {:required => {:criteria => criteria}})
end