Updated DNS API Dev Guide (markdown)

master
neil 2020-11-23 22:17:50 +08:00
parent bfe5c7ae0f
commit fe08c35134
1 changed files with 27 additions and 22 deletions

@ -20,19 +20,21 @@ acme.sh --issue -d example.com --dns dns_myapi
Here we go:
### 1. The cloudflare dns api is a recommended reference:
Read it first:
https://github.com/Neilpang/acme.sh/blob/master/dnsapi/dns_cf.sh
### 2. The script file name must be `myapi.sh`
The file name must be in this format: `yourApiName.sh`, in this example, it should be `myapi.sh`
### 3. The file can be placed in `acme.sh/` folder, or in `acme.sh/dnsapi/` subfolder.
If you want to contribute your script to `acme.sh` project, it must be placed in `acme.sh/dnsapi/` folder.
If you want to contribute your script to `acme.sh` project, it must be placed in `acme.sh/dnsapi/` folder.
If you just want to use your script on your machine, you can put it in `.acme.sh/` or `.acme.sh/dnsapi/` folders.
acme.sh searches the script files in either the acme.sh home dir(`.acme.sh/`) or in the `dnsapi` subfolder(`.acme.sh/dnsapi`).
### 4. The file shebang must be `sh` not `bash`
acme.sh is a `unix shell` script, not just a `bash` script.
If you want to contribute your script, the shebang must be:
@ -253,6 +255,9 @@ Example: https://github.com/Neilpang/acme.sh/issues/2057
Please follow the guide: https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test
### 12. Others
1. Don't use `grep -o` options, please use `_egrep_o()` function instead.
2. Don't use `curl` or `wget`, please use `_get()` or `_post()` function instead. The `_post()` function can send `POST`, `PUT` or `UPDATE` requests.
## Style Guidelines