Extended CloudFlare API
This was made with the intent of extending CloudFlare's Node.JS API with more functionality. Right now I'm only extending their DNS functionality in order to support updating existing records.
const cf = token: 'my-token'
Records may be expressed in different ways.
const record = 'example.com IN SSHFP 1 1 123456'
const record =type: 'A'name: 'example.com'content: '127.0.0.1'
Object (with data, for complex records)
// example.com IN SSHFP 1 2 123456const record =type: 'SSHFP'name: 'example.com'data:algorithm: 1type: 2content: '123456'
Creates a new record.
Updates an existing record or creates a new one.
Update is tricky: it will match existing records based on the
type properties on most protocols. Some exceptions exist, though, where we'll need the
data properties. See the following table to understand more.
|Protocol||Content A||Content B||Match|
|SSHFP||1 1 123456||1 1 654321||yes|
|SSHFP||1 1 123456||1 2 654321||no|
|SSHFP||1 1 123456||2 1 654321||no|