0.1.0-alpha.18 • Published 3 years ago
sandbar v0.1.0-alpha.18
sandbar-js
node / javascript / typescript library for sandbar
Basic Usage Example
First, add this library to your project:
$ npm add sandbar
Then, use it in a file somewhere:
import * as sandbar from "sandbar";
async function foo() {
// or "mycompany" for prod
const client = new sandbar.Client({ subdomain: "mycompany.sandbox" });
const submitResult = await client.submitEvents([
{
/* your entity / account / transaction / etc here */
},
{
/* multiple events are supported */
},
]);
// pretty-print the API call result as JSON to the console
console.log(JSON.stringify(submitResult, undefined, 2));
}
All client actions return a promise. If you don't like using await
, you can
also consume the promie via the .then()
callback.
client
.submitEvents([])
.then((submitResult) =>
console.log(JSON.stringify(submitResult, undefined, 2))
);
Detailed Example
This repo includes a more detailed example as a package. The example package includes a README as well.
0.1.0-alpha.16
3 years ago
0.1.0-alpha.18
3 years ago
0.1.0-alpha.17
3 years ago
0.1.0-alpha.10
3 years ago
0.1.0-alpha.12
3 years ago
0.1.0-alpha.11
3 years ago
0.1.0-alpha.14
3 years ago
0.1.0-alpha.13
3 years ago
0.1.0-alpha.15
3 years ago
0.1.0-alpha.9
3 years ago
0.1.0-alpha.8
3 years ago
0.1.0-alpha.7
3 years ago
0.1.0-alpha.6
3 years ago
0.1.0-alpha.5
3 years ago
0.1.0-alpha.4
3 years ago
0.1.0-alpha.3
3 years ago
0.1.0-alpha.1
3 years ago