Example #1
0
        public async Task <DnspodDomainListResult> List()
        {
            var args    = framework.getArgs();
            var content = new FormUrlEncodedContent(args);

            return(await DnspodApi.post <DnspodDomainListResult>("Domain.List", content));
        }
Example #2
0
        public async Task <DnspodRecordListResult> List(int domain_id)
        {
            var args = framework.getArgs();

            args["domain_id"] = domain_id.ToString();
            var content = new FormUrlEncodedContent(args);

            return(await DnspodApi.post <DnspodRecordListResult>("Record.List", content));
        }
Example #3
0
        public async Task <DnspodResult> Remove(int domain_id, int record_id)
        {
            var args = framework.getArgs();

            args["domain_id"] = domain_id.ToString();
            args["record_id"] = record_id.ToString();
            var content = new FormUrlEncodedContent(args);

            return(await DnspodApi.post <DnspodRecordCreateResult>("Record.Remove", content));
        }
Example #4
0
        /// <summary>
        /// 创建dns记录
        /// </summary>
        /// <param name="domain_id"></param>
        /// <param name="name"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public async Task <DnspodRecordCreateResult> Create(int domain_id, string sub_domain, string value)
        {
            var args = framework.getArgs();

            args["domain_id"]   = domain_id.ToString();
            args["sub_domain"]  = sub_domain;
            args["record_type"] = "TXT";
            args["record_line"] = "默认";
            args["value"]       = value;
            var content = new FormUrlEncodedContent(args);

            return(await DnspodApi.post <DnspodRecordCreateResult>("Record.Create", content));
        }