customerio-node
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -51,2 +51,14 @@ const Request = require('./request') | ||
} | ||
addToSegment(segmentId, customerIds = []) { | ||
return this.request.post(`${trackRoot}/segments/${segmentId}/add_customers`, { | ||
ids: customerIds | ||
}) | ||
} | ||
removeFromSegment(segmentId, customerIds = []) { | ||
return this.request.post(`${trackRoot}/segments/${segmentId}/remove_customers`, { | ||
ids: customerIds | ||
}) | ||
} | ||
} |
{ | ||
"name": "customerio-node", | ||
"description": "A node client for the Customer.io event API. http://customer.io", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"author": "Customer.io (https://customer.io", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -170,2 +170,26 @@ [![Build Status](https://travis-ci.org/customerio/customerio-node.svg)](https://travis-ci.org/customerio/customerio-node) | ||
### cio.addToSegment(id, customer_ids) | ||
Add customers to a manual segment. | ||
``` | ||
cio.addToSegment(1, ["1", "2", "3"]) | ||
``` | ||
#### Options | ||
* **segment_id**: String (required) | ||
* **customer_ids**: Array (required) | ||
### cio.removeFromSegment(id, customer_ids) | ||
Remove customers from a manual segment. | ||
``` | ||
cio.removeFromSegment(1, ["1", "2", "3"]) | ||
``` | ||
#### Options | ||
* **segment_id**: String (required) | ||
* **customer_ids**: Array (required) | ||
### Using Promises | ||
@@ -172,0 +196,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
109
225
11812
6
1