app/controllers/concerns/googledrive.rb
# given a google drive folder id, return the files in that folder
given a google drive folder id, return the files in that folder
given a google drive folder id return the files in that folder
def list_files_in_folder(folder)
    service = initialise_api
    files = service.list_files(q: "'#{folder}' in parents and trashed=false and (mimeType = 'application/vnd.google-apps.folder' or not mimeType contains 'application/vnd.google-apps')", 
                               order_by: 'folder,modifiedTime desc,name',
                               fields: 'files(id, name, parents, iconLink, mimeType, size)')
    files
  end
def list_files_in_folder ( folder ) service = initialise_api files = service . list_files ( q : "'#{folder}' in parents and trashed=false and (mimeType = 'application/vnd.google-apps.folder' or not mimeType contains 'application/vnd.google-apps')" , order_by : 'folder,modifiedTime desc,name' , fields : 'files(id, name, parents, iconLink, mimeType, size)' ) files end
given a google drive folder id, return the files in that folder
given a google drive folder id return the files in that folder
# Initialise the API
folder
<not_specific>