Skip to content

Commit

Permalink
Add redact example and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mheap committed Jun 1, 2018
1 parent c86088a commit 1063a55
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For full API documentation refer to [docs.nexmo.com](https://docs.nexmo.com/).

[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)

[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Management](#management) | [JWT (JSON Web Token)](#jwt)
[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)

## Installation

Expand Down Expand Up @@ -447,6 +447,14 @@ nexmo.updateSMSCallback(<NEW_CALLBACK_URL>,callback);
nexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);
```

## Redact

### Redact a specific ID

```js
nexmo.redact.transaction(id, type, callback);
```

## Media

### Upload a file
Expand Down Expand Up @@ -674,6 +682,8 @@ nexmo.options.rest.postUseQueryString(
* [ ] Inbound Call Webhook
* [x] Text-To-Speech Call
* [x] Text-To-Speech Prompt
* Redact
* [x] Transaction


## License
Expand Down
16 changes: 16 additions & 0 deletions examples/ex-redact-transaction.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = function(callback, config) {

var Nexmo = require('../lib/Nexmo');

var nexmo = new Nexmo({
apiKey: config.API_KEY,
apiSecret: config.API_SECRET
},
{debug: config.DEBUG}
);

nexmo.redact.transaction(config.REDACT_ID, config.REDACT_TYPE, function(err, data) {
if (err) { throw err; }
// Returns a 204 if successful, so no response body
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nexmo",
"author": "nexmo",
"version": "2.2.1",
"version": "2.3.0",
"main": "lib/Nexmo",
"keywords": [
"sms",
Expand Down

0 comments on commit 1063a55

Please sign in to comment.