fix(core): update

This commit is contained in:
2020-02-10 11:26:13 +00:00
parent 12f4456ebd
commit 7ec0fe78fc
7 changed files with 141 additions and 420 deletions

View File

@@ -21,20 +21,20 @@ easy cloudflare management
Use TypeScript for best in class instellisense.
```javascript
import * as cflare from '@mojoio/cloudflare'
import * as cflare from '@mojoio/cloudflare';
const myCflareAccount = new cflare.CflareAccount()
const myCflareAccount = new cflare.CflareAccount();
testCflareAccount.auth({
email: 'someuser@example.com',
key: 'someLongApiKey'
})
email: 'someuser@example.com',
key: 'someLongApiKey'
});
const myAsyncCflareManagement = async () => {
// get things
const myZones = await myCflareAccount.listZones() // zones are fully typed
const myIdForADomain = await myCflareAccount.getZoneId('example.com') // type number
const myRecordsForADomain = await myCflareAccount.listRecords('example.com') // records are fully typed
}
// get things
const myZones = await myCflareAccount.listZones(); // zones are fully typed
const myIdForADomain = await myCflareAccount.getZoneId('example.com'); // type number
const myRecordsForADomain = await myCflareAccount.listRecords('example.com'); // records are fully typed
};
```
## Contribution