Class: Cadenya::Resources::Objectives::Tools
- Inherits:
-
Object
- Object
- Cadenya::Resources::Objectives::Tools
- Defined in:
- lib/cadenya/resources/objectives/tools.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Tools
constructor
private
A new instance of Tools.
-
#list(objective_id, workspace_id:, cursor: nil, limit: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Objectives::ObjectiveTool>
Some parameter documentations has been truncated, see Models::Objectives::ToolListParams for more details.
Constructor Details
#initialize(client:) ⇒ Tools
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 Tools.
47 48 49 |
# File 'lib/cadenya/resources/objectives/tools.rb', line 47 def initialize(client:) @client = client end |
Instance Method Details
#list(objective_id, workspace_id:, cursor: nil, limit: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Objectives::ObjectiveTool>
Some parameter documentations has been truncated, see Models::Objectives::ToolListParams for more details.
Lists all tools that were assigned to an objective
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/cadenya/resources/objectives/tools.rb', line 27 def list(objective_id, params) parsed, = Cadenya::Objectives::ToolListParams.dump_request(params) query = Cadenya::Internal::Util.encode_query_params(parsed) workspace_id = parsed.delete(:workspace_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["v1/workspaces/%1$s/objectives/%2$s/tools", workspace_id, objective_id], query: query, page: Cadenya::Internal::CursorPagination, model: Cadenya::Objectives::ObjectiveTool, options: ) end |