@steedos-builder/sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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;

Readme

Keywords

none

Package Sidebar

Install

npm i @steedos-builder/sdk

Weekly Downloads

99

Version

1.0.0

License

MIT

Unpacked Size

512 kB

Total Files

16

Last publish

Collaborators

  • steedos-baozhoutao
  • yinlianghui
  • steedos-zhuangjianguo