Skip to content

Commit 5dadf45

Browse files
committed
add code snippets to docs
1 parent 3079234 commit 5dadf45

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

documentation/snippets/activity.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
```javascript
2+
var product = 'The selected product';
3+
var userEmail = 'thecurrentuser@me.com';
4+
Breinify.activity({
5+
'email': userEmail
6+
}, 'selectProduct', null, product, false, function () {
7+
show('Sent activity "selectProduct" with product "' + product + '".');
8+
});
9+
```

documentation/snippets/config.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```javascript
2+
Breinify.setConfig({
3+
apiKey: '23AD-F31F-F324-6666-AC2D-C526-D829-BBC2'
4+
});
5+
```

documentation/snippets/lookup.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
```javascript
2+
var userEmail = 'thecurrentuser@me.com';
3+
Breinify.lookup({
4+
'email': userEmail
5+
}, ['firstname'], false, function (data) {
6+
if (Breinify.UTL.isEmpty(data)) {
7+
window.alert('Hello ' + data.firstname.result);
8+
}
9+
});
10+
```

0 commit comments

Comments
 (0)