@bunpmjs/cloudflareapi
v0.0.2
Published
CloudFlare Api for managing DNS-Records...
Downloads
4
Readme
cloudflareapi
ENV (env variables)
- CLOUDFLARE_TOKEN= Make sure your api token is set to perform the requests to the account to the endpoint
Usage
Initialization
// the token can be set in the .env or in the constructor
const cfApi = new cloudflare({
token: "<Token>"
});
DNSrecords management
cfApi.DNSRecords.update({
zone_id: "<zone_id>",
set: {
current_name: "<current_record_name>",
name: "<new_name || current_record_name>",
proxied: true | false,
type: "record type"
}
})