generated/google-apis-keep_v1/lib/google/apis/keep_v1/service.rb
# Gets an attachment. To download attachment media via REST requires the alt=
# media query parameter. Returns a 400 bad request error if attachment media is
# not available in the requested MIME type.
# @param [String] name
#   Required. The name of the attachment.
# @param [String] mime_type
#   The IANA MIME type format requested. The requested MIME type must be one
#   specified in the attachment.mime_type. Required when downloading attachment
#   media and ignored otherwise.
# @param [String] fields
#   Selector specifying which fields to include in a partial response.
# @param [String] quota_user
#   Available to use for quota purposes for server-side applications. Can be any
#   arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [IO, String] download_dest
#   IO stream or filename to receive content download
# @param [Google::Apis::RequestOptions] options
#   Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::KeepV1::Attachment] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::KeepV1::Attachment]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
Gets an attachment. To download attachment media via REST requires the alt
media query parameter. Returns a 400 bad request error if attachment media is
not available in the requested MIME type.
Gets an attachment . To download attachment media via REST requires the alt media query parameter . Returns a 400 bad request error if attachment media is not available in the requested MIME type .
def download_medium(name, mime_type: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block)
          if download_dest.nil?
            command = make_simple_command(:get, 'v1/{+name}', options)
          else
            command = make_download_command(:get, 'v1/{+name}', options)
            command.download_dest = download_dest
          end
          command.response_representation = Google::Apis::KeepV1::Attachment::Representation
          command.response_class = Google::Apis::KeepV1::Attachment
          command.params['name'] = name unless name.nil?
          command.query['mimeType'] = mime_type unless mime_type.nil?
          command.query['fields'] = fields unless fields.nil?
          command.query['quotaUser'] = quota_user unless quota_user.nil?
          execute_or_queue_command(command, &block)
        end
def download_medium ( name , mime_type : nil , fields : nil , quota_user : nil , download_dest : nil , options : nil , & block ) if download_dest . nil? command = make_simple_command ( :get , 'v1/{+name}' , options ) else command = make_download_command ( :get , 'v1/{+name}' , options ) command . download_dest = download_dest end command . response_representation = Google :: Apis :: KeepV1 :: Attachment :: Representation command . response_class = Google :: Apis :: KeepV1 :: Attachment command . params [ 'name' ] = name unless name . nil? command . query [ 'mimeType' ] = mime_type unless mime_type . nil? command . query [ 'fields' ] = fields unless fields . nil? command . query [ 'quotaUser' ] = quota_user unless quota_user . nil? execute_or_queue_command ( command , & block ) end
Gets an attachment.
Gets an attachment .
None
Google::Apis::KeepV1::Attachment
[Google::Apis::ServerError] An error occurred on the server and the request can be retried
[ Google :: Apis :: ServerError ] An error occurred on the server and the request can be retried
[Google::Apis::ClientError] The request is invalid and should not be retried without modification
[ Google :: Apis :: ClientError ] The request is invalid and should not be retried without modification
[Google::Apis::AuthorizationError] Authorization is required
[ Google :: Apis :: AuthorizationError ] Authorization is required
name
mime_type
fields
quota_user
download_dest
options
block
options Request-specific options
options Request - specific options
]
Result & error if block supplied
Result & error if block supplied
result
parsed result object
parsed result object
err
error object if request failed
error object if request failed