<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mesibo Javascript Class Reference on mesibo documentation</title><link>https://docs.mesibo.com/chatbot/reference/</link><description>Recent content in Mesibo Javascript Class Reference on mesibo documentation</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.mesibo.com/chatbot/reference/index.xml" rel="self" type="application/rss+xml"/><item><title>Mesibo Chatbot and Scripting - Mesibo Object</title><link>https://docs.mesibo.com/chatbot/reference/mesibo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.mesibo.com/chatbot/reference/mesibo/</guid><description>&lt;p&gt;The core class Mesibo defines a set of event handlers and utilities that you can use to send messages, get message flags, receive messages, etc.&lt;/p&gt;
&lt;h1 id="constructor"&gt;Constructor&lt;a class="td-heading-self-link" href="#constructor" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The class Mesibo is not instantiable. A single instance of the class Mesibo, named mesibo exists in global context whose properties can be initialized. Refer &lt;a href=""&gt;Usage Notes&lt;/a&gt; for more details.&lt;/p&gt;
&lt;h1 id="properties"&gt;Properties&lt;a class="td-heading-self-link" href="#properties" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="mesiboonmessage-mandatory"&gt;Mesibo.onmessage &lt;sub&gt;mandatory&lt;/sub&gt;&lt;a class="td-heading-self-link" href="#mesiboonmessage-mandatory" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An event listener to be called when message is receieved. It is mandatory to initialize this event handler.
MUST return Message.PASS, Message.FAIL, Message.CONSUMED, Message.READ, Message.DELIVERED etc, or the message string.&lt;/p&gt;</description></item><item><title>Mesibo Chatbot and Scripting - Message Class</title><link>https://docs.mesibo.com/chatbot/reference/message/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.mesibo.com/chatbot/reference/message/</guid><description>&lt;p&gt;The Message class can be used to send messages. Messages received in the handler mesibo.onmessage will be of this type.&lt;/p&gt;
&lt;h2 id="constructor"&gt;Constructor&lt;a class="td-heading-self-link" href="#constructor" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="message"&gt;Message()&lt;a class="td-heading-self-link" href="#message" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The constructor initializes the Message class. It must be called before you perform any method calls.
Some of the property fields will be already initialized for you by mesibo and are also protected(read-only).&lt;/p&gt;
&lt;h2 id="properties"&gt;Properties&lt;a class="td-heading-self-link" href="#properties" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="messageaid-read-only"&gt;Message.aid &lt;sub&gt;read-only&lt;/sub&gt;&lt;a class="td-heading-self-link" href="#messageaid-read-only" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Application ID. If you are sending a message, it is necessary to set this field to a vaild aid. Automatically initialized.&lt;/p&gt;</description></item><item><title>Mesibo Chatbot and Scripting - HTTP Class</title><link>https://docs.mesibo.com/chatbot/reference/http/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.mesibo.com/chatbot/reference/http/</guid><description>&lt;p&gt;The &lt;code&gt;Http&lt;/code&gt; class can be used to make REST calls to a request endpoint and receive data asynchronously.&lt;/p&gt;
&lt;h3 id="constructor"&gt;Constructor&lt;a class="td-heading-self-link" href="#constructor" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Http()&lt;br&gt;
The constructor initializes the Http class. It must be called before you perform any method calls.&lt;/p&gt;
&lt;h3 id="properties"&gt;Properties&lt;a class="td-heading-self-link" href="#properties" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To make an HTTP call you can set the following properties for an Http class object.&lt;/p&gt;
&lt;h3 id="httpurl"&gt;Http.url&lt;a class="td-heading-self-link" href="#httpurl" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Both http and https URL are supported. You can also pass authentication information in URL. For example, &lt;a href="https://username:password@yourapiurl.com"&gt;https://username:password@yourapiurl.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Mesibo Chatbot and Scripting - Socket Class</title><link>https://docs.mesibo.com/chatbot/reference/socket/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.mesibo.com/chatbot/reference/socket/</guid><description>&lt;p&gt;The Socket class can be used to connect to a host through a scoket, to send and receive data asynchronously.&lt;/p&gt;
&lt;h2 id="constructor"&gt;Constructor&lt;a class="td-heading-self-link" href="#constructor" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="socketurl"&gt;Socket(url)&lt;a class="td-heading-self-link" href="#socketurl" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The constructor initializes the Socket class. It must be called before you perform any method calls.
Call the constructor by passing the url(For websockets) or host address(for regular sockets).&lt;/p&gt;
&lt;p&gt;The URL is to be specified in the format:
&lt;code&gt;&amp;lt;type&amp;gt;://&amp;lt;url&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The following types are available:&lt;/p&gt;</description></item><item><title>Mesibo Chatbot and Scripting - Dialogflow Class</title><link>https://docs.mesibo.com/chatbot/reference/dialogflow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.mesibo.com/chatbot/reference/dialogflow/</guid><description>&lt;p&gt;The Dialogflow class can be used to connect to the Dialogflow chatbot service endpoint over REST&lt;/p&gt;
&lt;h3 id="constructor"&gt;Constructor&lt;a class="td-heading-self-link" href="#constructor" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id="dialogflow"&gt;Dialogflow()&lt;a class="td-heading-self-link" href="#dialogflow" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The constructor initializes the Dialogflow class. It must be called before you perform any method calls.&lt;/p&gt;
&lt;h3 id="properties"&gt;Properties&lt;a class="td-heading-self-link" href="#properties" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To connect to a chatbot you can set the following properties for an Dialogflow class object.&lt;/p&gt;
&lt;h4 id="dialogflowproject_id"&gt;Dialogflow.project_id&lt;a class="td-heading-self-link" href="#dialogflowproject_id" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Google Cloud Project ID linked with your Dialogflow chatbot.&lt;/p&gt;
&lt;h4 id="dialogflowservice_account"&gt;Dialogflow.service_account&lt;a class="td-heading-self-link" href="#dialogflowservice_account" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Google Project service account. A service account is identified by its email address, which is unique to the account.&lt;/p&gt;</description></item><item><title>GoogleCloudService</title><link>https://docs.mesibo.com/chatbot/reference/googlecloudservice/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.mesibo.com/chatbot/reference/googlecloudservice/</guid><description>&lt;p&gt;The &lt;code&gt;GoogleCloudService&lt;/code&gt; class can be used to connect to various Google Cloud API Services like Google Translate, Dialogflow, GoogleMaps, etc&lt;/p&gt;
&lt;h3 id="constructor"&gt;Constructor&lt;a class="td-heading-self-link" href="#constructor" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h3 id="googlecloudservice"&gt;GoogleCloudService()&lt;a class="td-heading-self-link" href="#googlecloudservice" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The constructor initializes the GoogleCloudService class. It must be called before you perform any method calls.&lt;/p&gt;
&lt;h3 id="properties"&gt;Properties&lt;a class="td-heading-self-link" href="#properties" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;To connect to a chatbot you can set the following properties for an GoogleCloudService class object.&lt;/p&gt;
&lt;h3 id="googlecloudserviceurl"&gt;GoogleCloudService.url&lt;a class="td-heading-self-link" href="#googlecloudserviceurl" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;REST URL endpoint of the API&lt;/p&gt;</description></item><item><title>Utility functions</title><link>https://docs.mesibo.com/chatbot/reference/utilities/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.mesibo.com/chatbot/reference/utilities/</guid><description>&lt;p&gt;mesibo provides a set of utilities for generating a random number, hashing, etc.&lt;/p&gt;
&lt;h2 id="random32"&gt;random32()&lt;a class="td-heading-self-link" href="#random32" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Returns a 32-bit psuedo-random number.&lt;/p&gt;
&lt;h3 id="syntax"&gt;Syntax&lt;a class="td-heading-self-link" href="#syntax" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;random32&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="parameters"&gt;Parameters&lt;a class="td-heading-self-link" href="#parameters" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h3 id="return-value"&gt;Return value&lt;a class="td-heading-self-link" href="#return-value" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;unsigned 32-bit integer&lt;/p&gt;
&lt;h2 id="random64"&gt;random64()&lt;a class="td-heading-self-link" href="#random64" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Returns a 64-bit psuedo-random number.&lt;/p&gt;
&lt;h3 id="syntax-1"&gt;Syntax&lt;a class="td-heading-self-link" href="#syntax-1" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;random64&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="parameters-1"&gt;Parameters&lt;a class="td-heading-self-link" href="#parameters-1" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h3 id="return-value-1"&gt;Return value&lt;a class="td-heading-self-link" href="#return-value-1" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;unsigned 64-bit integer&lt;/p&gt;
&lt;h2 id="hash64"&gt;hash64()&lt;a class="td-heading-self-link" href="#hash64" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Returns a hash of the input.&lt;/p&gt;
&lt;h3 id="syntax-2"&gt;Syntax&lt;a class="td-heading-self-link" href="#syntax-2" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;hash64&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="parameters-2"&gt;Parameters&lt;a class="td-heading-self-link" href="#parameters-2" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Any valid object&lt;/p&gt;</description></item></channel></rss>