Class: FileApiClient::Move

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

Instance Method Summary collapse

Constructor Details

#initialize(file, parent_file, index: 0) ⇒ Move

Returns a new instance of Move.



47
48
49
50
51
# File 'lib/dynalist/file_api_client.rb', line 47

def initialize(file, parent_file, index: 0)
  @file = file
  @parent_file = parent_file
  @index = index
end

Instance Method Details

#to_queryObject



53
54
55
56
57
58
59
60
61
# File 'lib/dynalist/file_api_client.rb', line 53

def to_query
  {
    action: "move",
    type: @file.type,
    file_id: @file.id,
    parent_id: @parent_file.id,
    index: @index
  }
end