2019-07-18 11:51:56 +02:00
|
|
|
# @mojoio/cloudflare
|
2017-01-29 18:22:17 +01:00
|
|
|
easy cloudflare management
|
|
|
|
|
2019-07-18 11:51:56 +02:00
|
|
|
## Availabililty and Links
|
|
|
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@mojoio/cloudflare)
|
|
|
|
* [gitlab.com (source)](https://gitlab.com/mojoio/cloudflare)
|
|
|
|
* [github.com (source mirror)](https://github.com/mojoio/cloudflare)
|
|
|
|
* [docs (typedoc)](https://mojoio.gitlab.io/cloudflare/)
|
2017-01-29 18:22:17 +01:00
|
|
|
|
|
|
|
## Status for master
|
2019-07-18 11:51:56 +02:00
|
|
|
[](https://gitlab.com/mojoio/cloudflare/commits/master)
|
|
|
|
[](https://gitlab.com/mojoio/cloudflare/commits/master)
|
|
|
|
[](https://www.npmjs.com/package/@mojoio/cloudflare)
|
|
|
|
[](https://snyk.io/test/npm/@mojoio/cloudflare)
|
|
|
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
|
|
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
|
|
|
[](https://prettier.io/)
|
2016-04-27 02:20:27 +02:00
|
|
|
|
|
|
|
## Usage
|
2018-08-14 01:53:52 +02:00
|
|
|
|
2017-01-29 18:22:17 +01:00
|
|
|
Use TypeScript for best in class instellisense.
|
2016-04-27 02:20:27 +02:00
|
|
|
|
|
|
|
```javascript
|
2017-01-29 18:22:17 +01:00
|
|
|
import * as cflare from 'cflare'
|
|
|
|
|
|
|
|
let myCflareAccount = new cflare.CflareAccount()
|
|
|
|
testCflareAccount.auth({
|
|
|
|
email: 'someuser@example.com',
|
|
|
|
key: 'someLongApiKey'
|
|
|
|
})
|
|
|
|
|
|
|
|
let myAsyncCflareManagement = async () => {
|
|
|
|
// get things
|
|
|
|
let myZones = await myCflareAccount.listZones() // zones are fully typed
|
|
|
|
let myIdForADomain = await myCflareAccount.getZoneId('example.com') // type number
|
|
|
|
let myRecordsForADomain = await myCflareAccount.listRecords('example.com') // records are fully typed
|
|
|
|
|
|
|
|
// set things
|
|
|
|
myCflareAccount.updateRecord(...)
|
|
|
|
myCflareAccount.createRecord(...)
|
|
|
|
myCflareAccount.deleteRecord(...)
|
|
|
|
}
|
|
|
|
```
|
2016-04-27 02:27:52 +02:00
|
|
|
|
2019-07-18 11:51:56 +02:00
|
|
|
For further information read the linked docs at the top of this readme.
|
2017-02-12 21:18:32 +01:00
|
|
|
|
|
|
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
2019-07-18 11:51:56 +02:00
|
|
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
2017-02-12 21:18:32 +01:00
|
|
|
|
2019-07-18 11:51:56 +02:00
|
|
|
[](https://maintainedby.lossless.com)
|