var request = require('request')

var digio_api = function (token) {
  var API_URL = 'https://api.digitalocean.com/v2/'

  var digio_headers = {
    'Authorization': 'Bearer ' + token,
    'Content-Type': 'application/json'
  }

  var tools = {
    _get: function (action, callback) {
      request({
        url: API_URL + action,
        headers: digio_headers
      },
      function (err, res, body) {
        if (err) return callback(err)
        if (res.statusCode >= 400) return callback(JSON.parse(body), body)

        callback(null, body || {})
      })
    },

    _post: function (action, body, callback) {
      request.post({
        url: API_URL + action,
        headers: digio_headers,
        body: JSON.stringify(body)
      },
      function (err, res, body) {
        if (err) return callback(err)
        if (res.statusCode >= 400) return callback(JSON.parse(body), body)

        callback(null, body || {})
      })
    }

  }

  return {
    droplets: require('./modules/droplets')(tools),
    domains: require('./modules/domains')(tools)
  }
}



module.exports = digio_api

@@ -880,32 +880,366 @@
 e(body), body)%0A%0A
+        callback(null, body %7C%7C %7B%7D)%0A      %7D)%0A    %7D,%0A%0A    _delete: function (action, callback) %7B%0A      request.del(%7B%0A        url: API_URL + action,%0A        headers: digio_headers%0A      %7D,%0A      function (err, res, body) %7B%0A        if (err) return callback(err)%0A        if (res.statusCode %3E= 400) return callback(JSON.parse(body), body)%0A%0A
         callback

Add delete method to digio-api