   #            port: Akismet API server port, defaults to 80
   #            userAgent: The user agent string passed to Akismet API, defaults to 'Generic Node.js/1.0.0 | Akismet 2.4.0'
   #            charSet: The character set of comment texts, defaults to 'utf-8'
-  #            debug: set to true to print debug information, defaults to false
   constructor: (options) ->
     @blog = options.blog or ''
     @apiKey = options.apiKey

  # callback: err, isValid (true or false)
  verifyKey: (callback) ->
    callback or= () ->
    @keyClient or= http.createClient @port, @host
    @postRequest @keyClient, '/1.1/verify-key', { key: @apiKey, blog: @blog }, (err, status, headers, body) ->
      callback err, (if status >= 200 and status < 300 and body is 'valid' then true else false)



    callback or= () ->
    options.blog = @blog
    options.user_agent = @userAgent
    @postRequest @endPoint, '/1.1/submit-spam', options, (err, status, headers, body) ->
      callback err


