Socket
Socket
Sign inDemoInstall

irritable

Package Overview
Dependencies
6
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

irritable


Version published
Weekly downloads
0
Maintainers
1
Install size
454 kB
Created
Weekly downloads
 

Readme

Source

irritable

NPM

Iterable API request wrapper for client && node.js

Install

$ npm install irritable --save

Usage

// Send event to Iterable
var token = process.env.ITERABLE_TOKEN
var Irritable = require('irritable')({
    token: token //API Token
})

Irritable.Events.track({
  eventName: 'test',
  email: 'test@test.com'
}).then(console.log)

TODO

API

irritable(options) -> object
options
token

Required
Type: string or process.env.ITERABLE_TOKEN

Token / key used to communicate with Iterable API

baseURL

Optional Type: string Default: http://api.iterable.com/api/

Base URL of iterable api.

timeout

Optional Type: number Default: 3000 ms

Timeout of request life sent to iterable

responseType

Optional Type: string Default: json

Response type sent back from iterable

irritable.Events -> object

returns event handler object:

{
  track: <fn>,
  trackPushOpen: <fn>,
  trackConversion: <fn>
}
irritable.Events.track(eventObject) -> promise

Sends a validated event object to Iterable.

eventObject
email

optional
Type: string

Email associated with the event.

eventName

required
Type: string

eventName associated with the event.

createdAt

optional
Type: string

date / unix timestamp of the associated event.

dataFields

optional
Type: object

Metadata for the event.

campaignId

optional
Type: number

campaignId of the event.

templateId

optional
Type: number

templateId of the event.

irritable.Events.trackConversion(eventObject) -> promise

Sends a validated trackConversion event object to Iterable.

eventObject
email

required
Type: string

Email associated with the event.

campaignId

required
Type: number

campaignId of the event.

createdAt

optional
Type: string

date / unix timestamp of the associated event.

dataFields

optional
Type: object

Metadata for the event.

templateId

optional
Type: number

templateId of the event.

irritable.Events.trackPushOpen(eventObject) -> promise

Sends a validated trackPushOpen event object to Iterable.

eventObject
email

required
Type: string

Email associated with the event.

userId

required
Type: string

UserId associated with the event.

campaignId

required
Type: number

campaignId of the event.

createdAt

optional
Type: string

date / unix timestamp of the associated event.

dataFields

optional
Type: object

Metadata for the event.

templateId

optional
Type: number

templateId of the event.

Keywords

FAQs

Last updated on 03 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc