Skip to content

React module to facilitate communication between demo app and guided demo framework

License

Notifications You must be signed in to change notification settings

darryncampbell-pubnub/pubnub-demo-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please be aware that this application / sample is provided as-is for demonstration purposes without any guarantee of support

PubNub-Demo-Integration

This is an internal PubNub tool.

NPM module designed to be used in JavaScript and TypeScript applications to facilitate communication between a demo app and the PubNub guided demo framework.

Installation

npm i pubnub-demo-integration

Interface

To send a message to the demo framework to indicate an action is completed:

Typescript:

actionCompleted(
  {
    action:'Action Name', 
    blockDuplicateCalls:true, // only applicable when called from the clientside
    debug:false
  });

Javascript:

actionCompleted(
{
  action: 'Action Name',
  debug: false,
  windowLocation: 'http://...',  // Optionally, pass in the URL of the current page so the identifier can be determined from the query string
  fetchClient: object // If run from the serverside, you can pass in an HTTP client for the module to use.  Clientside will use fetch()
});

You also need to define the action in the demo project's features.json file, at the root of the project:

{
    "features": [
      "Action Name"
    ]
}

About

React module to facilitate communication between demo app and guided demo framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published