1.0.5 • Published 2 years ago

@buildable/events v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@buildable/events

A NodeJS SDK for handling Events with Buildable workflows.

Emit

NodeJS

// require
const { createClient } = require('@buildable/events')

const client = createClient(process.env.MY_BUILDABLE_SECRET)

// ...
const successful = client.emit('EVENT-NAME', { myEssentialValue: 'Buildable rocks' });

Using Curl

curl --location --request POST 'https://development-events.buildable.io/emit' \
--header 'X-Buildable-Secret: <YOUR SECRET 🤫>' \
--header 'Content-Type: application/json' \
--data-raw '{
    <ANY KEY>: <ANY VALUE>,
    ...
}'

Listen

// import
const { createClient } = require('@buildable/events');

const client = createClient(process.env.MY_BUILDABLE_SECRET)

// ...
client.on('EVENT-NAME', (event) => {
    //do stuff
})
1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago