This repository contains examples of code that can be used in PubNub BLOCKS to use the mnubo's SmartObjects platform.
- Follow the BLOCKS Hello World tutorial.
- Replace the Event Handler code by the content of one of the files in dist
- postEvents.js - on incoming message post an event to mnubo
- createObject.js - on incoming message create an object if it does not exist
- createOwner.js - on incoming message create an object if it does not exist
PubNub has a limit of 3 external calls per BLOCK, if you want more, you can request it here.
PubNub BLOCKs are available from a catalog. When you install a BLOCK from the catalog, a template is used to generate an Event Handler for your code. Currently, mnubo offers 3 different BLOCKs and their template is available from this repository: blocks-catalog-mnubo. The code was taken from the dist folder.
If you want to update the code from a template:
- make a pull request here (ensure clean code using build tools)
- make a pull request on the PubNub repository