Module: Lark::Apis::Drive::Folder

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

Instance Method Summary collapse

Instance Method Details

#children(user_access_token:, folder_token:, types: nil) ⇒ Object



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

def children(user_access_token:, folder_token:, types: nil)
  get "drive/explorer/v2/folder/#{folder_token}/children",
      access_token: user_access_token,
      params: { types: types }.compact
end

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



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

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

#meta(user_access_token:, folder_token:) ⇒ Object



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

def meta(user_access_token:, folder_token:)
  get "drive/explorer/v2/folder/#{folder_token}/meta",
      access_token: user_access_token
end

#root_meta(user_access_token:) ⇒ Object



16
17
18
19
# File 'lib/lark/apis/drive/folder.rb', line 16

def root_meta(user_access_token:)
  get 'drive/explorer/v2/root_folder/meta',
      access_token: user_access_token
end