Skip to content

Latest commit

 

History

History
130 lines (97 loc) · 5.5 KB

HelloSMS.md

File metadata and controls

130 lines (97 loc) · 5.5 KB

hellosms

Module for sending SMS messages via the HelloSMS API

Version: 2.0.0

hellosms~SMSDispatcher

Kind: inner class of hellosms
Properties

Name Type Description
LoggingSubject string The sender of the message as logged in the API
AutomaticallyShortenLinks boolean Automatically shorten links in the message
TestMode boolean Enable test mode for the API
RequestCallback boolean Request a callback from the API
RejectUntrustedCert boolean Reject untrusted certificates
Endpoint string The API endpoint to use
Username string The username for the API
Password string The password for the API
Sender string The sender of the message

new SMSDispatcher(username, password, sender)

Class for sending SMS messages via the HelloSMS API

Param Type Description
username string The username for the API
password string The password for the API
sender string The sender of the message

smsDispatcher.SendMessage(message) ⇒ Promise.<SMSDispatchResult>

Send a textmessage using the API

Kind: instance method of SMSDispatcher
Returns: Promise.<SMSDispatchResult> - - Promise object with the response from the API
Access: public

Param Type
message SMSMessage

hellosms~SMSMessage

Kind: inner class of hellosms
Properties

Name Type Description
Recipient string Recipient phone number
Text string Text message to send
SendTime Date | undefined Optional time to send the message

new SMSMessage(recipient, text, [sendTime])

Class to represent a single SMS message

Param Type
recipient string
text string
[sendTime] Date | undefined

hellosms~responseObject : SMSDispatchResult

Kind: inner property of hellosms

hellosms~SMSDispatchResult : Object

Results of dispatching a message, contains a status, results for each recipient, message details, sender, callback status, link shortening status and delay

Kind: inner typedef of hellosms
Properties

Name Type Description
status string The status of the API request
results Array.<SMSMessageResult> Array of results for each recipient
message Object Object with message details
message.originalText string The original text message
message.processedText string The processed text message
message.encoding string The encoding used for the message
message.totalChars number The total number of characters in the message
message.totalMessages number The total number of messages in the message
sender string The sender of the message
callbackEnabled boolean If a callback was requested
automaticallyShortenLinks boolean If links were automatically shortened
delay number The delay in seconds before the message is sent

hellosms~SMSMessageResult : Object

A single result of a message dispatch

Kind: inner typedef of hellosms
Properties

Name Type Description
apiId string The API ID for the message
recipient string The recipient of the message
queued boolean If the message was queued for sending