// See documentation to set up the client first
let apiInstance = new superlink.SubdomainApi();
let parentDomain = "supertest.me";
let subDomainName = "nora";
let request = ApiSubDomainMintRequest.constructFromObject({
'nameData' : {
'addresses' : {
'60' : '0xA4D70E9dd42Fef6Af37EBD48a1bA5Bc1D695Ee72'
},
'contenthash' : '0xe301017012204edd2984eeaf3ddf50bac238ec95c5713fb40b5e428b508fdbe55d3b9f155ffe',
'text' : {
'avatar': 'https://test.com/images/NpkRq1qqYbq17mcfFj1hUk5eDzE.jpg'
}
}
}, null);
apiInstance.subdomainMint(parentDomain, subDomainName, request, (error, data, response) => {
if (error) {
console.error(error);
}
});
// See documentation to set up the client first
parentDomain := "supertest.me"
subDomainName := "nora"
contenthash := "0xe301017012204edd2984eeaf3ddf50bac238ec95c5713fb40b5e428b508fdbe55d3b9f155ffe"
addresses := map[string]string {
'60' : '0xA4D70E9dd42Fef6Af37EBD48a1bA5Bc1D695Ee72'
}
text := map[string]string {
'avatar': 'https://test.com/images/NpkRq1qqYbq17mcfFj1hUk5eDzE.jpg'
}
request := ApiSubDomainMintRequest{
NameData: &ApiSubDomainNameData{
Addresses: &addresses,
Contenthash: &contenthash,
Text: &text,
},
}
r, err := superlinkClient.SubdomainAPI.SubdomainMint(context.Background(), parentDomain, subDomainName).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SubdomainAPI.SubdomainMint``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
# See documentation to set up the client first
api_instance = superlink.SubdomainApi(api_client)
parent_domain = 'supertest.me'
subdomain_name = 'nora'
request = ApiSubDomainMintRequest.from_dict({
'nameData' : {
'addresses' : {
'60' : '0xA4D70E9dd42Fef6Af37EBD48a1bA5Bc1D695Ee72'
},
'contenthash' : '0xe301017012204edd2984eeaf3ddf50bac238ec95c5713fb40b5e428b508fdbe55d3b9f155ffe',
'text' : {
'avatar': 'https://test.com/images/NpkRq1qqYbq17mcfFj1hUk5eDzE.jpg'
}
}
})
try:
api_instance.subdomain_mint(parent_domain, subdomain_name, request)
except Exception as e:
print("Exception when calling SubdomainApi->subdomain_mint: %s\n" % e)

