Class: NodeApiClient::Move

Inherits:
Object
  • Object
show all
Defined in:
lib/dynalist/node_api_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent_node, node, index = 0) ⇒ Move

Returns a new instance of Move.



57
58
59
60
61
# File 'lib/dynalist/node_api_client.rb', line 57

def initialize(parent_node, node, index = 0)
  @parent_node = parent_node
  @node = node
  @index = index
end

Instance Method Details

#to_queryObject



63
64
65
66
67
68
69
70
# File 'lib/dynalist/node_api_client.rb', line 63

def to_query
  {
    action: "move",
    parent_id: @parent_node.node_id,
    node_id: @node.node_id,
    index: @index
  }
end