Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

customerio-node

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

customerio-node - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

12

lib/index.js

@@ -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
})
}
}

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc