Skip to content

Commit

Permalink
change factory to a Class, bump to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
officert committed Dec 4, 2018
1 parent 4613852 commit 0ce8021
Show file tree
Hide file tree
Showing 36 changed files with 2,495 additions and 140 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Create a Sift Science HTTP Client using your API Key:

```javascript
//get the Sift Science factory
const siftScience = require('node-siftscience');
const SiftScienceClient = require('node-siftscience');

//create an instance of the Sift Science client
const client = siftScience.init('your API Key');
const client = new SiftScienceClient('your API Key');

//now you can use the client to make requests to Sift Science's API
client.events.create({
Expand All @@ -33,20 +33,20 @@ client.events.create({

## Table of Contents

- [Debug Mode](#debug mode)
- [Debug Mode](<#debug mode>)

- [Events](#events)
- [Events](#events)

- [Labels](#labels)
- [Score](#score)
- [Decisions](#decisions)
- [Labels](#labels)
- [Score](#score)
- [Decisions](#decisions)

## Debug mode

When creating your Sift Science Client instance you can put it in debug mode to log any errors

```javascript
const client = siftScience.init('your API Key', {
const client = new SiftScienceClient('your API Key',{
debugMode: true
});
```
Expand Down
1 change: 0 additions & 1 deletion lib/client/decisions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ function getDecisionsApi(siftScienceClient) {
throw error;
});
},

/**
* @param {String} accountId
* @param {String} orderId
Expand Down
9 changes: 0 additions & 9 deletions lib/factory.js

This file was deleted.

4 changes: 3 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module.exports = require('./factory');
const SiftScienceClient = require('./client');

module.exports = SiftScienceClient;
Loading

0 comments on commit 0ce8021

Please sign in to comment.