dnspod-api
A dnspod api for nodejs. (使用最新认证方式,兼容DNSPOD国际版和国内版)
Features
-
For dnspod.com or dnspod.cn.
-
Multiple-instance.
-
Implementation by promise.
-
Use login token replace user & password auth.
DNSPOD API documents
The actions and params that you can find.
Dnspod.cn : https://www.dnspod.cn/docs
Dnspod.com : https://www.dnspod.com/docs
How to get token
First of all, you should get the login token.
Dnspod.cn : https://support.dnspod.cn/Kb/showarticle/tsid/227
Dnspod.com : https://www.dnspod.com/docs/info.html#get-the-user-token
Install
npm install dnspod-api -g
Useage
BIN Example
dnspod-api --token 'xxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' --action 'Domain.List'
or
dnspod-api -s 'dnspod.cn' -t 'xxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' -a 'Record.List' -p '{"domain": "your-domain.com", "sub_domain": "@"}'
Warning: If the token string have $
, please replace it with \$
.
API Example
// requirevar DnspodApi = ; // new dnspodApi instancevar dnspodApi = server : 'dnspod.cn' // which server you are using . dnspod.com (default) | dnspod.cn token : 'xxxxx,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' // your login token, you can find how to get this at the top.; // do actionsdnspodApi//.then ....