-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
28 lines (26 loc) · 985 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import CF from './src/CloudFlare'
import DNS from './src/dns/index'
/**
* Constructs and returns a new Cloudflare API client with the specified authentication.
*
* @class Cloudflare
* @param {Object} auth - The API authentication for an account
* @param {string} auth.email - The account email address
* @param {string} auth.key - The account API key
* @param {string} auth.token - The API token
*
* @property {DNS} dns - Extended DNS Records API
* @property {DNSRecords} dnsRecords - DNS Records instance
* @property {IPs} ips - IPs instance
* @property {Zones} zones - Zones instance
* @property {ZoneSettings} zoneSettings - Zone Settings instance
* @property {ZoneCustomHostNames} zoneCustomHostNames - Zone Custom Host Names instance
* @property {User} user - User instance
* @function applyPlugin - Applies a new plugin
*/
export default function CloudFlare(auth) {
const cloudflare = CF(auth)
cloudflare.applyPlugin(DNS)
return cloudflare
}
export { DNS }