Skip to content

Commit

Permalink
changed var to const in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aydrian committed Aug 24, 2017
1 parent d58ee32 commit 4d8bb77
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,24 @@ npm install sparkpost

Passing in an API key
```js
var SparkPost = require('sparkpost');
var client = new SparkPost('YOUR_API_KEY');
const SparkPost = require('sparkpost');
const client = new SparkPost('YOUR_API_KEY');
```

Using an API key stored in an environment variable
```js
//Create an env var as SPARKPOST_API_KEY
var SparkPost = require('sparkpost');
var client = new SparkPost();
const SparkPost = require('sparkpost');
const client = new SparkPost();
```

Specifying non-default options
```js
var SparkPost = require('sparkpost');
var options = {
const SparkPost = require('sparkpost');
const options = {
endpoint: 'https://dev.sparkpost.com:443'
};
var client = new SparkPost('YOUR_API_KEY', options);
const client = new SparkPost('YOUR_API_KEY', options);
```

## Using the Node Client Library Base Object
Expand All @@ -97,7 +97,7 @@ the Metrics resource.

```js
// Get a list of domains that the Metrics API contains data on.
var options = {
const options = {
uri: 'metrics/domains'
};

Expand All @@ -118,8 +118,8 @@ relevant to the email being sent. The send method will return a promise that wil
successful and if not information about the error that occurred. If a callback is passed, it will be executed.

```javascript
var SparkPost = require('sparkpost');
var client = new SparkPost('<YOUR API KEY>');
const SparkPost = require('sparkpost');
const client = new SparkPost('<YOUR API KEY>');

client.transmissions.send({
options: {
Expand Down

0 comments on commit 4d8bb77

Please sign in to comment.