def link(path, options={})
      path = path.sub(/^\//, '')
      begin
        rest = Dropbox.check_path(path).split('/')
        rest << { :ssl => @ssl }
        api_response(:get, 'links', root(options), *rest)
      rescue UnsuccessfulResponseError => error
        return error.response['Location'] if error.response.kind_of?(Net::HTTPFound)
        #TODO shouldn't be using rescue blocks for normal program flow
        raise error
      end
    end
def link(path, options={})
      path = path.sub(/^\//, '')
      begin
        rest = Dropbox.check_path(path).split('/')
        rest << { :ssl => @ssl }
        api_response(:get, 'links', root(options), *rest)
      rescue UnsuccessfulResponseError => error
        return error.response['Location'] if error.response.kind_of?(Net::HTTPFound)
        #TODO shouldn't be using rescue blocks for normal program flow
        raise error
      end
    end
Returns a cookie-protected URL that the authorized user can use to view
 the file at the given path. This URL requires an authorized user.

 The path is assumed to be relative to the configured mode's root.

 Options:

 +mode+:: Temporarily changes the API mode. See the MODES array.