From 2c32d21dd017daa334feb574538fab70695c4e66 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 1 Nov 2017 09:36:28 +0800 Subject: [PATCH] Updated DNS API Dev Guide (markdown) --- DNS-API-Dev-Guide.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/DNS-API-Dev-Guide.md b/DNS-API-Dev-Guide.md index 03589ce..5ad968a 100644 --- a/DNS-API-Dev-Guide.md +++ b/DNS-API-Dev-Guide.md @@ -48,7 +48,24 @@ dns_cf_rm() { } ``` Actually, the `dns_myapi_add()` is required, but `dns_cf_rm()` is optional. You can just write the add function at the beginning for testing purpose, it's `highly recommended` to implement the rm function too. Otherwise your txt records will increase 1 every 2 months. -### 6. +### 6. Guide for the add function +Steps when you write the `dns_myapi_add()` function: +#### 1. Get the full domain and the txt record: + +``` +dns_cf_add() { + fulldomain=$1 + txtvalue=$2 +.... + +``` +The full domain is like: +1. `_acme-challenge.www.example.com` +2. or `_acme-challenge.example.com` +3. or `_acme-challenge.example.co.uk` +4. or `_acme-challenge.www.example.co.uk` + +