Package Exports
- yield-siftscience
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (yield-siftscience) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Yield Sift Science
A promise-wrapped helper lib for yielding Sift Science API calls
Installation
Using npm:
$ npm install yield-siftscienceUsage
Require with API Keys:
var siftscience = require('yield-siftscience')('YOUR_SIFT_SCIENCE_REST_API_KEY');Send Event:
var result = yield siftscience.event.create_account({
'$session_id': 'abcdefghijklmnopqrstuvwxyz',
'$user_id': '12345',
'$user_email': 'example@email.com'
});
console.log(result);Send Label:
var result = yield siftscience.label('user_id', {
'$is_bad': true,
'$reasons': [ '$spam', '$chargeback' ],
'$description': 'Because they are spamming and abusing our system'
});
console.log(result);Get Score:
var score = yield siftscience.score('user_id');
console.log(score);