Module: Lark::Apis::Drive::File

Defined in:
lib/lark/apis/drive/file.rb

Instance Method Summary collapse

Instance Method Details

#copy(user_access_token:, file_token:, payload:) ⇒ Object



11
12
13
14
15
# File 'lib/lark/apis/drive/file.rb', line 11

def copy(user_access_token:, file_token:, payload:)
  post "drive/explorer/v2/file/copy/files/#{file_token}",
       payload,
       access_token: user_access_token
end

#create(user_access_token:, folder_token:, title:, type:) ⇒ Object



5
6
7
8
9
# File 'lib/lark/apis/drive/file.rb', line 5

def create(user_access_token:, folder_token:, title:, type:)
  post "drive/explorer/v2/file/#{folder_token}",
       { title: title, type: type },
       access_token: user_access_token
end

#delete_doc(user_access_token:, token:) ⇒ Object



17
18
19
20
# File 'lib/lark/apis/drive/file.rb', line 17

def delete_doc(user_access_token:, token:)
  delete "drive/explorer/v2/file/docs/#{token}",
         access_token: user_access_token
end

#delete_sheet(user_access_token:, token:) ⇒ Object



22
23
24
25
# File 'lib/lark/apis/drive/file.rb', line 22

def delete_sheet(user_access_token:, token:)
  delete "drive/explorer/v2/file/spreadsheets/#{token}",
         access_token: user_access_token
end