Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domain-intl QueryContactInfo 的响应不包含文档中的 zh* 字段 #579

Open
StephanoGeorge opened this issue Nov 23, 2022 · 1 comment

Comments

@StephanoGeorge
Copy link

  • 产品和接口: domain-intl QueryContactInfo
  • 平台:
  • 最小代码:

文档:https://next.api.aliyun.com/document/Domain/2018-01-29/QueryContactInfo
domain-intl QueryContactInfo 的响应不包含文档中的 zh* 字段,如:ZhProvince

@ljluestc
Copy link

package main

import (
	"fmt"
	"log"
	"github.com/aliyun/alibaba-cloud-sdk-go/services/domainintl"
)

func main() {
	// Initialize the Domain client
	client, err := domainintl.NewClientWithAccessKey("cn-hangzhou", "<your-access-key-id>", "<your-access-key-secret>")
	if err != nil {
		log.Fatalf("Error initializing client: %v", err)
	}

	// Create the request for QueryContactInfo
	request := domainintl.CreateQueryContactInfoRequest()
	request.DomainName = "example.com" // replace with your domain name

	// Send the request and get the response
	response, err := client.QueryContactInfo(request)
	if err != nil {
		log.Fatalf("Error querying contact info: %v", err)
	}

	// Print the response
	fmt.Println("Response:", response)

	// Check if the zh* fields are present in the response
	if response.ZhProvince != "" {
		fmt.Println("ZhProvince:", response.ZhProvince)
	} else {
		fmt.Println("ZhProvince field is missing.")
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants