API Docs for: 2.6
Show:

plugin_rest_sms Class

Module: plugins_rest
Parent Module: com_sms_rest

REST plugin that provides sms functions through the following REST API:

POST requests

  1. sms/send

sms/send

The client sends new sms for the recipient. The request must contains the following parameters:

  • to: the destination number of the sms message
  • body: the body of the sms message

Example JSON request parameters:

{ "text": "message text", "to": "0123456789" }

Methods

send

(
  • req
  • res
  • next
)

Sends a new sms message by the following REST API:

send

Parameters:

  • req Object

    The client request.

  • res Object

    The client response.

  • next Function

    Function to run the next handler in the chain.

setCompAuthorization

(
  • comp
)
static

Set the authorization architect component.

Parameters:

  • comp Object

    The architect authorization component

setCompSms

(
  • comp
)

Set sms architect component used by sms functions.

Parameters:

  • comp Object

    The sms architect component.

setCompUtil

(
  • comp
)

Sets the utility architect component.

Parameters:

  • comp Object

    The utility architect component.

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

Properties

compAuthorization

Object private

The architect component to be used for authorization.

compSms

Object private

The sms architect component used for sms functions.

compUtil

Object private

The utility architect component.

IDLOG

String private final

The module identifier used by the logger.

Default: [plugins_rest/sms]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

post

Array

REST API to be requested using HTTP POST request.

Sub-properties:

  • send String

    To send a new sms message