Browse Source

add configuration examples to readme

pull/2/merge v0.1.0
Brett Langdon 13 years ago
parent
commit
6ab53b829d
1 changed files with 27 additions and 1 deletions
  1. +27
    -1
      README.md

+ 27
- 1
README.md View File

@ -19,6 +19,32 @@ cd ./node-dogapi
npm install npm install
``` ```
## Configuration
You will need your Datadog api key as well as an application key to use `dogapi`.
Keys can be found at: https://app.datadoghq.com/account/settings#api
The keys can be provided either as constructor parameters when creating an instance of `dogapi`
as `api_key` and `app_key` or as the environment variables `DD_API_KEY` and `DD_APP_KEY`.
**Constructor parameters:**
```javascript
var dogapi = require('dogapi');
var options = {
api_key: 'YOUR_KEY_HERE',
app_key: 'YOUR_KEY_HERE',
};
var app = new dogapi(options);
```
**Environment Variables:**
```bash
DD_API_KEY=YOUR_KEY_HERE DD_APP_KEY=YOUR_KEY_HERE node app.js
```
## API ## API
`dogapi` implements all available functions in the official datadog api, http://docs.datadoghq.com/api/. `dogapi` implements all available functions in the official datadog api, http://docs.datadoghq.com/api/.
@ -119,4 +145,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Loading…
Cancel
Save