lib/browse_everything/driver/google_drive.rb
def link_for(id)
        file = drive_service.get_file(id, fields: 'id, name, size')
        auth_header = { 'Authorization' => "Bearer #{credentials.access_token}" }
        extras = {
          auth_header: auth_header,
          expires: 1.hour.from_now,
          file_name: file.name,
          file_size: file.size.to_i
        }
        [download_url(id), extras]
      end
# Retrieve a link for a resource
# @param id [String] identifier for the resource
# @return [Array<String, Hash>] authorized link to the resource
Retrieve a link for a resource
Retrieve a link for a resource
def link_for(id)
        file = drive_service.get_file(id, fields: 'id, name, size')
        auth_header = { 'Authorization' => "Bearer #{credentials.access_token}" }
        extras = {
          auth_header: auth_header,
          expires: 1.hour.from_now,
          file_name: file.name,
          file_size: file.size.to_i
        }
        [download_url(id), extras]
      end
def link_for ( id ) file = drive_service . get_file ( id , fields : 'id, name, size' ) auth_header = { 'Authorization' => "Bearer #{credentials.access_token}" } extras = { auth_header : auth_header , expires : 1 . hour . from_now , file_name : file . name , file_size : file . size . to_i } [ download_url ( id ) , extras ] end
Retrieve a link for a resource
Retrieve a link for a resource
authorized link to the resource
authorized link to the resource
Array<String, Hash>
id
identifier for the resource
identifier for the resource