public async Task <DnspodDomainListResult> List() { var args = framework.getArgs(); var content = new FormUrlEncodedContent(args); return(await DnspodApi.post <DnspodDomainListResult>("Domain.List", content)); }
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)); }
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)); }
public static async Task <DnspodApiItem> Create(string token) { var api = new DnspodApi(token); var domains = (await api.Domain.List()).domains; return(new DnspodApiItem() { api = api, domains = domains, }); }
/// <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)); }
public DomainApi(DnspodApi framework) { this.framework = framework; }
public RecordApi(DnspodApi framework) { this.framework = framework; }