Class: Cadenya::Resources::Search

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/resources/search.rb,
sig/cadenya/resources/search.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Search

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Search.

Parameters:



41
42
43
# File 'lib/cadenya/resources/search.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#search_tools_or_tool_sets(query:, workspace_id: nil, request_options: {}) ⇒ Cadenya::Models::SearchSearchToolsOrToolSetsResponse

Some parameter documentations has been truncated, see Models::SearchSearchToolsOrToolSetsParams for more details.

Searches for tools or tool sets in the workspace

Parameters:

  • query (String)

    Query param

  • workspace_id (String)

    Path param: NOTE: query is runtime-required (buf.validate min_len), but gnosti

  • request_options (Cadenya::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/cadenya/resources/search.rb', line 22

def search_tools_or_tool_sets(params)
  parsed, options = Cadenya::SearchSearchToolsOrToolSetsParams.dump_request(params)
  query = Cadenya::Internal::Util.encode_query_params(parsed)
  workspace_id =
    parsed.delete(:workspace_id) do
      @client.workspace_id
    end
  @client.request(
    method: :get,
    path: ["v1/workspaces/%1$s/search/tools_or_tool_sets", workspace_id],
    query: query,
    model: Cadenya::Models::SearchSearchToolsOrToolSetsResponse,
    options: options
  )
end