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)


160
161
162
# File 'lib/runcible/resources/repository.rb', line 160

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