API Docs for: 2.6
Show:

plugin_rest_all_historysms Class

Module: plugins_rest
Parent Module: com_sms_rest

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

GET requests

  1. all_historysms/day/:day
  2. all_historysms/day/:day/:filter
  3. all_historysms/interval/:from/:to
  4. all_historysms/interval/:from/:to/:filter

all_historysms/interval/:from/:to

Returns the history of the sms sent in the interval time by all the users.

Example JSON response:

[
    {
       datesent: "11/06/2014"
       timesent: "17:46:46"
       id: 7
       status: 1
       destination: "00393401234567"
       sender: "alessandro"
       text: "test sms"
    }
]

all_historysms/interval/:from/:to/:filter

Returns the history of the sms sent in the interval time by all the users filtering the results.

Example JSON response:

[
    {
       datesent: "11/06/2014"
       timesent: "17:46:46"
       id: 7
       status: 1
       destination: "00393401234567"
       sender: "alessandro"
       text: "test sms"
    }
]

all_historysms/day/:day

Returns the history of the sms sent in the specified day by all the users.

Example JSON response:

[
    {
       datesent: "11/06/2014"
       timesent: "17:46:46"
       id: 7
       status: 1
       destination: "00393401234567"
       sender: "alessandro"
       text: "test sms"
    }
]

all_historysms/day/:day/:filter

Returns the history of the sms sent in the specified day by all the users filtering the results.

Example JSON response:

[
    {
       datesent: "11/06/2014"
       timesent: "17:46:46"
       id: 7
       status: 1
       destination: "00393401234567"
       sender: "alessandro"
       text: "test sms"
    }
]

Methods

day

(
  • req
  • res
  • next
)

Search the history sms sent by all the users in the specified day and optional filter the results with the following REST api:

day/:day
day/:day/:filter

Parameters:

  • req Object

    The client request.

  • res Object

    The client response.

  • next Function

    Function to run the next handler in the chain.

    It uses interval function.

interval

(
  • req
  • res
  • next
)

Search the history of the sms sent by all the users for the specified interval time and optional filter the results by destination, with the following REST api:

interval/:from/:to
interval/:from/:to/:filter

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

(
  • cp
)

Set sms architect component used by sms functions.

Parameters:

  • cp 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.

setPrivacy

(
  • str
)

Sets the string to be used to hide last digits of phone numbers in privacy mode.

Parameters:

  • str Object

    The string used to hide last digits of phone numbers.

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.

get

Array

REST API to be requested using HTTP GET request.

Sub-properties:

  • interval/:from/:to String

    To get the history of the sms sent in the interval time by all the users

  • interval/:from/:to/:filter String

    To get the history of the sms sent in the interval time by all the users filtering the results by "destination" field of db table

  • day/:day String

    To get the history of the sms sent in the specified day by all the users. The date must be expressed in YYYYMMDD format

  • day/:day/:filter String

    To get the history of the sms sent in the specified day by all the users filtering the results by "destination" field of db table. The date must be expressed in YYYYMMDD format

IDLOG

String private final

The module identifier used by the logger.

Default: [plugins_rest/all_historysms]

logger

Object private

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

Default: console

privacyStrReplace

String private

The string used to hide phone numbers in privacy mode.

Default: "xxx"