class Multiwoven::Integrations::Destination::MicrosoftExcel::Client

def get_file(token, drive_id)

def get_file(token, drive_id)
  url = format(MS_EXCEL_FILES_API, drive_id: drive_id)
  response = Multiwoven::Integrations::Core::HttpClient.request(
    url,
    HTTP_GET,
    headers: auth_headers(token)
  )
  files = JSON.parse(response.body)["value"]
  excel_files = files.select { |file| file["name"].match(/\.(xlsx|xls|xlsm)$/) }
  excel_files.map { |file| { name: file["name"], id: file["id"] } }
end