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

how to specify the domain name to add the record to? #114

Closed
Daxcor69 opened this issue May 8, 2021 · 1 comment · Fixed by #115
Closed

how to specify the domain name to add the record to? #114

Daxcor69 opened this issue May 8, 2021 · 1 comment · Fixed by #115
Assignees

Comments

@Daxcor69
Copy link

Daxcor69 commented May 8, 2021

try {
const input = {
type: "A", // string
name: "www", // string
data: "162.10.66.0", // string
priority: null, // number
port: null, // number
ttl: 1800, // number
weight: null, // number
flags: null, // number
tag: null // string
};
const {data:{domain_record}} = await dots.domain.createDomainRecord(input);
console.log(domain_record);
} catch (error) {
console.log(error);
}

in the api docs it is part of the url
https://api.digitalocean.com/v2/domains/{domain_name}/records

Brad

@pjpimentel
Copy link
Owner

hey @Daxcor69

looks like the attribute is missing in my docs. Thanks for showing this.

As all inputs are "typed", you can always trust the autocomplete on your code editor OR check the raw fn code:

https://www.github.com/pjpimentel/dots/tree/master/src%2Fmodules%2Fdomain%2Fcreate-domain-record%2Fcreate-domain-record.ts

It accepts the "domain_name" input.

@pjpimentel pjpimentel linked a pull request May 17, 2021 that will close this issue
@pjpimentel pjpimentel self-assigned this May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants