@steedos-builder/sdk
v1.0.0
Published
## Getting Started
Downloads
523
Keywords
Readme
Builder Core
Getting Started
import { builder } from '@steedos-builder/sdk';
builder.init(YOUR_KEY);
// Optional custom targeting
builder.setUserAttributes({
userIsLoggedIn: true,
whateverKey: 'whatever value',
});
builder
.get(YOUR_MODEL_NAME, {
// Optional custom query
query: {
'data.customField.$gt': 100,
},
})
.promise()
.then(({ data }) => {
// Do something with the data
});
// The options that you can send to builder.get and builder.getAll
builder
.getAll(YOUR_MODEL_NAME, {
limit: 10,
})
.promise()
.then(({ data }) => {
// Do something with the data
});
// Turn of cookies/tracking
builder.canTrack = false;