Event FeedBack Classifier PubNub fucntion
Pubnub Function creation
Step 1 : Login to the Pubnub account with the valid credentials.
Step 2 : Click the "CREATE NEW APP" by giving a name to your APP.
You can see the newly created APP in the page.
Step 3 : Click on the newly created APP.
You can see the Demo keyset for the new application created.
Step 4 : Click on the Demo keyset and click on the Functions (on the left side). Step 5 : Create a new Function by giving the name and description to the Fucntion. Step 6 : Create the Module(previously called as Event Handler) by clicking CREATE button or GUIDE ME button(for step by step process) at the bottom. Step 7 : Give the Name of the Module, Channel to communicate with the Fucntion and the option of when function
code should execute(Before of After publish of the message).
To know which Event Type to select and why click here Step 8 : Click on the newly created Module. Step 9 : Copy the funtion code in the text area from here.
Step 10 : Update line 12 & 13 to set variable 'username' and 'password' to the username and password obtained after creating the Watson Natural Langauge Classifier.
Also dont forget to update the 'url' with url you got while configuring the Natural Language Classifier.
Save the block.
Your funtion code is now running