1.0.1 • Published 5 years ago
minfraud-node v1.0.1
minFraud Node Client
A Promise & TypeScript-ified Node client for minFraud fraud mitigation API.
Enables super handy auto-completion for minFraud input and response data in IDEs like VSCode and WebStorm. We're also
using Promises allowing
you take advantage of the the brand spanking new
async
/await
syntax.
Installation
Takes a second to install using npm.
npm install minfraud-node
Usage
Import and initialize the client.
import MinFraud from 'minfraud-node';
const client = new MinFraud({
accountId: '123456', // Your MaxMind Account ID
license: 'yItotWnzWooT' // Your MaxMind License Key
})
Get Score
const score = await client.score({
device: {
ip_address: '127.0.0.1'
}
});
Get Insight
const insight = await client.insight({
device: {
ip_address: '127.0.0.1'
}
});
Get Factors
const factor = await client.factor({
device: {
ip_address: '127.0.0.1'
}
});
License
This repository is licensed under the ISC license.
Copyright (c) 2019, Jørgen Vatle.