def get_file(key, type=:file, expected_checksum = nil)
      response = get(key, expected_checksum)
      response = Response.new(
        'key' => response.key,
        'checksum' => response.checksum,
        'filename' => response.data['filename'],
        'file' => Base64.decode64(response.data[type.to_s]),
        'deleted' => response.deleted?)
    end
def get_file(key, type=:file, expected_checksum = nil)
      response = get(key, expected_checksum)
      response = Response.new(
        'key' => response.key,
        'checksum' => response.checksum,
        'filename' => response.data['filename'],
        'file' => Base64.decode64(response.data[type.to_s]),
        'deleted' => response.deleted?)
    end
Recover a file stored at a given SAM key

 @param [String] key of the file to access
 @param [Symbol] type of the file to be recovered. Can be either :doc and :video.
 @return [Response] response object holding the file and some metadata

 @raise [NSISam::Errors::Client::KeyNotFoundError] when the key doesn't exists
 @raise [NSISam::Errors::Client::AuthenticationError] when user and password doesn't match

 @note Use of wrong "type" parameter can generate errors.

 @example
   nsisam.get_file("some key")
   nsisam.store_file("test", :doc) # stored at key 'test_key'
   nsisam.get_file("test_key", :doc)