@solidgoldpig/fb-user-datastore-client-node
v0.0.29
Published
Form Builder User Data Store Client (Node)
Downloads
5
Readme
Form Builder User Data Store client (Node)
Client for making requests to Form Builder platform user datastore endpoints
Requirements
Node
Installation
npm install @solidgoldpig/fb-user-datastore-client-node
Usage
Loading and initialising
// load client
const FBUserDataStoreClient = require('@solidgoldpig/fb-user-datastore-client-node')
// initialise client
const userDataStoreClient = new FBUserDataStoreClient(serviceSecret, serviceToken, serviceSlug, userDataStoreUrl)
Fetching and storing
// fetch user data
const userData = await userDataStoreClient.getData(userId, userToken)
// store user data
await userDataStoreClient.setData(userId, userToken, userData)