index.js
function addRecord(options) {
    options.type = options.type || 'CNAME';
    return getZone(options.domain)
      .then(function (zone) {
        return self.cloudflareClient.addRecord(
          zone.id,
          _.extend({ttl: 1}, mapRecordOptions(options)));
      })
      .then(function (response) {
          return new Result([
            format(
              'Added %s record %s -> %s',
              response.data.result.type,
              response.data.result.name,
              response.data.result.content
            )
          ]);
        }
      )
  }
function addRecord(options) {
    options.type = options.type || 'CNAME';
    return getZone(options.domain)
      .then(function (zone) {
        return self.cloudflareClient.addRecord(
          zone.id,
          _.extend({ttl: 1}, mapRecordOptions(options)));
      })
      .then(function (response) {
          return new Result([
            format(
              'Added %s record %s -> %s',
              response.data.result.type,
              response.data.result.name,
              response.data.result.content
            )
          ]);
        }
      )
  }
function addRecord ( options ) { options . type = options . type || 'CNAME' ; return getZone ( options . domain ) . then ( function ( zone ) { return self . cloudflareClient . addRecord ( zone . id , _ . extend ( { ttl : 1 } , mapRecordOptions ( options ) ) ) ; } ) . then ( function ( response ) { return new Result ( [ format ( 'Added %s record %s -> %s' , response . data . result . type , response . data . result . name , response . data . result . content ) ] ) ; } ) }
Create a new record of the given type
@param options
@return {*}
Create a new record of the given type