Skip to content

Commit

Permalink
add score api,
Browse files Browse the repository at this point in the history
update read me
  • Loading branch information
officert committed Jun 13, 2017
1 parent d9a3d99 commit 7b49ff1
Show file tree
Hide file tree
Showing 9 changed files with 287 additions and 124 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ client.events.create({

- [Events](#events)
- [Labels](#labels)
- [Score](#score)

## Events

Expand Down Expand Up @@ -238,14 +239,37 @@ client.events.verification({
client.labels.createByUserId('userId', {
$type: 'your custom event',
$is_bad : true,
$abuse_type: 'payment_abuse'
$abuse_types: 'payment_abuse,promotion_abuse'
});
```

### [Unlabel User](https://siftscience.com/developers/docs/curl/labels-api/unlabel-user)

```javascript
client.labels.deleteByUserId('userId', {
$abuse_type: 'payment_abuse'
$abuse_types: 'payment_abuse,promotion_abuse'
});
```

## Score

### [User Score](https://siftscience.com/developers/docs/curl/score-api/score-api)

```javascript
client.score.getByUserId('userId', {
$abuse_types: 'payment_abuse,promotion_abuse'
});
```

You can also ask the API to return a user's score when creating [events](#events).

```javascript
client.events.create({
$type: 'your custom event',
$user_id : '123',
$session_id: 'gigtleqddo84l8cm15qe4il'
}, { //2nd argument are query string params
$return_score: true,
$abuse_types: 'payment_abuse,promotion_abuse'
});
```
Loading

0 comments on commit 7b49ff1

Please sign in to comment.