Class: PEClient::Resource::NodeClassifierV1::GroupChildren

Inherits:
Base
  • Object
show all
Defined in:
lib/pe_client/resources/node_classifier.v1/group_children.rb

Overview

Use the group-children endpoint to retrieve a list of node groups descending from a specific node group.

Constant Summary collapse

BASE_PATH =

The base path for Node Classifier API v1 group children endpoints.

"#{NodeClassifierV1::BASE_PATH}/group-children".freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PEClient::Resource::Base

Instance Method Details

#get(id, depth: nil) ⇒ Array<Hash>

Retrieve a list of node groups descending from a specific node group,

Parameters:

  • id (String)
  • depth (Integer) (defaults to: nil)

    optional depth parameter to limit how many levels of descendants are returned. For example, depth: 2 limits the response to the group’s immediate children and first grandchildren. If depth: 0 the response only returns the base group and no children or grandchildren.

Returns:

  • (Array<Hash>)


37
38
39
# File 'lib/pe_client/resources/node_classifier.v1/group_children.rb', line 37

def get(id, depth: nil)
  @client.get "#{BASE_PATH}/#{id}", params: {depth:}.compact
end