   @BASE_URL = 'http://f.hatena.ne.jp'
 
   # constructor
-  # options:
-  # - type     : always 'wsse'. authentication type. (optional)
-  # - username : wsse authentication username. (required)
-  # - apikey   : wsse authentication apikey. (required)
+  # params:
+  #   options: (required)
+  #   - type     : authentication type. default `'wsse'`
+  #   - username : wsse authentication username. (required)
+  #   - apikey   : wsse authentication apikey. (required)
   constructor: ({ type, username, apikey }) ->
     @_type = type ? 'wsse'
     @_username = username

    @_request { method, path, body }, callback

  # DELETE EditURI (/atom/edit/XXXXXXXXXXXXXX)
  # options:
  # - id: image id. (required)
  # callback:
  # - err: error
  # - res: response
  destroy: ({ id }, callback) ->
    return callback(new Error('options.id is required')) unless id?
    method = 'delete'

xml2js = require 'xml2js'
{Promise} = require 'q'

# Hatena::Fotolife API wrapper
#
# - POST   PostURI (/atom/post)                => Fotolife#create
# - PUT    EditURI (/atom/edit/XXXXXXXXXXXXXX) => Fotolife#update
# - DELETE EditURI (/atom/edit/XXXXXXXXXXXXXX) => Fotolife#destroy
