torus-tools / stack

Deploy static websites to the AWS Cloud using a single command.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add namecheap as a DNS record provider

gkpty opened this issue · comments

The namecheap API is written in xml. To be able to deal with the xml API in a similar fashion to the other APIs we are gonna have to use xml2js
https://www.npmjs.com/package/xml2js

  1. the user must create and add their namecheap API keys.
    https://www.namecheap.com/support/api/intro/

to create/update/delete a record:

  1. the gethosts method has to be called
  2. the JSON response has to overwrittwen (to add a new record, update an existing record, or remove a record)
  3. The sethosts method can be called and passed the modified JSON.
    https://www.namecheap.com/support/api/methods/domains-dns/set-hosts/