Skip to content

Instantly share code, notes, and snippets.

@angelacode
Last active May 16, 2016 04:06
Show Gist options
  • Save angelacode/80c949ead08a7f62510c6dbcb12d0111 to your computer and use it in GitHub Desktop.
Save angelacode/80c949ead08a7f62510c6dbcb12d0111 to your computer and use it in GitHub Desktop.
def search_by_query_return_array(query, limit = 100, sort = 'asc')
# return is an Array
# query is a query for Orchesetrate IO
# element from schedules orchestrate: https://github.com/angelacode/kaya-nitrous/wiki/schemas#collection--schedules
begin
logger.progname __method__
query = query + " AND value.bot_client_id: #{@bot_client_id}"
logger.debug query
logger.debug limit
logger.debug sort
#@response = @client.search(@collection, query,{"limit" => limit,"sort"=> sort})
#@response_array = @response.results
# @response.status = status
#logger.debug @response_array
return @response_array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment