UNPKG

633 BMarkdownView Raw
1# Builder Core
2
3## Getting Started
4
5```javascript
6import { builder } from '@builder.io/sdk';
7
8builder.init(YOUR_KEY);
9
10// Optional custom targeting
11builder.setUserAttributes({
12 userIsLoggedIn: true,
13 whateverKey: 'whatever value',
14});
15
16builder
17 .get(YOUR_MODEL_NAME, {
18 // Optional custom query
19 query: {
20 'data.customField.$gt': 100,
21 },
22 })
23 .promise()
24 .then(({ data }) => {
25 // Do something with the data
26 });
27
28// Turn of cookies/tracking
29builder.canTrack = false;
30```
31
32More docs coming soon!
33
34If you have questions or comments don't hesitate to each out by creating an issue or emailing steve@builder.io