Global

Members

http

Author:
License:
  • See LICENSE.md file included in this distribution.
Source:

Methods

_createPackage(raw) → {String}

Creates an encrypted package to send.
Source:
Parameters:
Name Type Description
raw Object The data to send.
Name Type Description
cuid String Session identifier.
text String Message text.
Returns:
Type:
String
- Encrypted string.

_decrypt(raw) → {String}

Decrypts the incoming data.
Source:
Parameters:
Name Type Description
raw String Encrypted data.
Returns:
Type:
String
- Decrypted string.

_decryptJSON(raw) → {Object}

Decrypts an encrypted JSON object.
Source:
Parameters:
Name Type Description
raw String Encrypted data.
Returns:
Type:
Object
- Decrypted JSON.

_encrypt(raw) → {String}

Encrypts the incoming data.
Source:
Parameters:
Name Type Description
raw String Decrypted data.
Returns:
Type:
String
- Encrypted string.

_merger(raw) → {String}

Merge and convert a string.
Source:
Parameters:
Name Type Description
raw String The string to convert.
Returns:
Type:
String
- The converted string.

_verification(data) → {Boolean}

Validation UUID format string.
Source:
Parameters:
Name Type Description
data String The string to check.
Returns:
Type:
Boolean

connect(uuid, callback)

Connects to the server and returns the connection data.
Source:
Parameters:
Name Type Description
uuid String The bot UUID.
callback requestCallback The callback that handles the response.

send(raw, callback)

Send a message to the server and return a response.
Source:
Parameters:
Name Type Description
raw Object The data to send.
Name Type Description
cuid String Session identifier.
text String Message text.
callback requestCallback The callback that handles the response.