dynect-api
Advanced tools
Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "dynect-api", | ||
"version": "1.0.9", | ||
"description": "A barely functional, yet servicable, Dynect Managed DNS API Interface", | ||
"version": "1.0.10", | ||
"description": "A barely functional, yet servicable, Dynect Managed DNS REST API Interface", | ||
"repository": { | ||
@@ -11,3 +11,3 @@ "type": "git", | ||
"scripts": { | ||
"build": "babel source --presets babel-preset-es2015 --out-dir dist", | ||
"build": "babel src --presets babel-preset-es2015 --out-dir dist", | ||
"prepublish": "npm run build" | ||
@@ -14,0 +14,0 @@ }, |
@@ -1,1 +0,49 @@ | ||
dynect-api | ||
# dynect-api | ||
# A barely functional, yet servicable, Dynect Managed DNS REST API Interface | ||
## Installation | ||
- `npm i dynect-api` | ||
### Build your self | ||
- `git clone https://github.com/TheNorthRemembers/dynect-api.git` and then `npm run build` | ||
## Usage Examples (ES6) | ||
All calls return Promises and are `async` and awaitable. | ||
``` | ||
const Dynect = require('dynect-api'); | ||
// initialize | ||
Dynect.init({ | ||
customer_name: 'Customer Name', | ||
user_name: 'Dynect Username', | ||
password: 'Dynect Password', | ||
}); | ||
// login | ||
await Dynect.login().catch((err) => { | ||
// do something on error | ||
}); | ||
// get all zones | ||
const zones = await request('/Zone', 'GET', null).then((response) => { | ||
// do something with response if you want before returning it | ||
}).catch((err) => { | ||
// do something with an error | ||
}); | ||
``` | ||
To make a request | ||
``` | ||
const response = await request(apiPath, method, data); | ||
``` | ||
There are a few wrapper functions | ||
``` | ||
const zones = await Dynect.getZones(); | ||
const zone = await Dynect.getZone(zonePath); | ||
``` | ||
## Resources | ||
[Dynect resources by topic](https://help.dyn.com/rest-resources-by-topic/) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6395
50