Skip to content

PubNub exposes a feature called BLOCKS which enables it's users to build cusom logic for the messages going through the system. This repository contains BLOCKs examples to integrate with mnubo.

License

Notifications You must be signed in to change notification settings

mnubo/pubnub-block

Repository files navigation

mnubo PubNub BLOCK

This repository contains examples of code that can be used in PubNub BLOCKS to use the mnubo's SmartObjects platform.


Usage

  1. Follow the BLOCKS Hello World tutorial.
  2. Replace the Event Handler code by the content of one of the files in dist

Examples

  • 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

Note:

PubNub has a limit of 3 external calls per BLOCK, if you want more, you can request it here.

Development

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

About

PubNub exposes a feature called BLOCKS which enables it's users to build cusom logic for the messages going through the system. This repository contains BLOCKs examples to integrate with mnubo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •