app/controllers/concerns/googledrive.rb
# create a Google Drive API object, authenticate and return it
create a Google Drive API object, authenticate and return it
create a Google Drive API object authenticate and return it
def initialise_api
    service = Google::Apis::DriveV3::DriveService.new.tap do |client|
    end
    service.client_options.application_name = 'Research Data York Google Drive Browser'
    client = oauth2client
    client.update!(refresh_token: session[:refresh_token])
    client.fetch_access_token!
    service.authorization = client
    service
  end
def initialise_api service = Google :: Apis :: DriveV3 :: DriveService . new . tap do | client | end service . client_options . application_name = 'Research Data York Google Drive Browser' client = oauth2client client . update! ( refresh_token : session [ :refresh_token ] ) client . fetch_access_token! service . authorization = client service end
create a Google Drive API object, authenticate and return it
create a Google Drive API object authenticate and return it
#client.request_options.timeout_sec = 1200 #client.request_options.open_timeout_sec = 1200 #client.request_options.retries = 3