def watch(key, opts = {})
      params = { wait: true }
      fail ArgumentError, 'Second argument must be a hash' unless opts.is_a?(Hash)
      timeout = opts[:timeout] || @read_timeout
      index = opts[:waitIndex] || opts[:index]
      params[:waitIndex] = index unless index.nil?
      params[:consistent] = opts[:consistent] if opts.key?(:consistent)
      params[:recursive] = opts[:recursive] if opts.key?(:recursive)

      response = api_execute(
        key_endpoint + key,
        :get,
        timeout: timeout,
        params: params
      )
      Response.from_http_response(response)
    end
def watch(key, opts = {})
      params = { wait: true }
      fail ArgumentError, 'Second argument must be a hash' unless opts.is_a?(Hash)
      timeout = opts[:timeout] || @read_timeout
      index = opts[:waitIndex] || opts[:index]
      params[:waitIndex] = index unless index.nil?
      params[:consistent] = opts[:consistent] if opts.key?(:consistent)
      params[:recursive] = opts[:recursive] if opts.key?(:recursive)

      response = api_execute(
        key_endpoint + key,
        :get,
        timeout: timeout,
        params: params
      )
      Response.from_http_response(response)
    end
Gives a notification when specified key changes

 This method takes the following parameters as arguments
 @ key   - key to be watched
 @options [Hash] additional options for watching a key
 @options [Fixnum] :index watch the specified key from given index
 @options [Fixnum] :timeout specify http timeout