autopilot-sdk
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -136,4 +136,4 @@ 'use strict'; | ||
var encodedURIComponent = encodeURIComponent(emailOrId); | ||
var path = singleBasePath + '/' + encodedURIComponent; | ||
return _utils2.default.request('delete', path, options); | ||
var path = singleBasePath + '/' + encodedURIComponent + '/unsubscribe'; | ||
return _utils2.default.request('post', path, options); | ||
}; | ||
@@ -152,5 +152,6 @@ | ||
get: get.bind(thisArg), | ||
delete: del.bind(thisArg) | ||
delete: del.bind(thisArg), | ||
unsubscribe: unsubscribe.bind(thisArg) | ||
}; | ||
}; | ||
//# sourceMappingURL=methods.js.map |
@@ -101,4 +101,4 @@ import utils, { parse, getVariables } from './utils'; | ||
const encodedURIComponent = encodeURIComponent(emailOrId); | ||
const path = `${singleBasePath}/${encodedURIComponent}`; | ||
return utils.request('delete', path, options); | ||
const path = `${singleBasePath}/${encodedURIComponent}/unsubscribe`; | ||
return utils.request('post', path, options); | ||
}; | ||
@@ -118,3 +118,4 @@ | ||
delete: del.bind(thisArg), | ||
unsubscribe: unsubscribe.bind(thisArg), | ||
}; | ||
}; |
{ | ||
"name": "autopilot-sdk", | ||
"description": "Node SDK for Autopilot", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"author": "Samuel Amoah <sa.am@programmer.net>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -112,3 +112,15 @@ <p align="center"><a href="https://autopilothq.com/images/svg/logo-dark.svg" target="_blank"><img src="https://autopilothq.com/images/svg/logo-dark.svg" height="60" /></a></p> | ||
await autopilot.contacts.delete('test@example.com'); | ||
//=> undefined | ||
``` | ||
### contacts#unsubscribe() | ||
**Parameters:** | ||
- _**emailOrId**_ - As the name suggest, it must be an `email` or `contact_id` to unsubscribe | ||
**Example:** | ||
```javascript | ||
await autopilot.contacts.unsubscribe('test@example.com'); | ||
//=> undefined | ||
``` | ||
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
34748
487
126