API Docs for: 2.6
Show:

plugin_rest_historysms Class

Module: plugins_rest
Parent Module: com_sms_rest

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

GET requests

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

historysms/interval/:from/:to

Returns the history of the sms created in the interval time by the user.

Example JSON response:

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

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

Returns the history of the sms created in the interval time by the user filtering the results by destination number.

Example JSON response:

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

historysms/day/:day

Returns the history of the sms created in the specified day by the user.

Example JSON response:

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

historysms/day/:day/:filter

Returns the history of the sms created in the specified day by the user filtering the results by destination number.

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 the applicant user 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 created by the applicant user for the specified interval time and optional filter the results by destination number, 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

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

get

Array

REST API to be requested using HTTP GET request.

Sub-properties:

  • interval/:from/:to String

    To get the history of the sms created in the interval time by the applicant user

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

    To get the history of the sms created in the interval time by the applicant user filtering the results by "destination" field of db table

  • day/:day String

    To get the history of the sms created in the specified day by the applicant user. The date must be expressed in YYYYMMDD format

  • day/:day/:filter String

    To get the history of the sms created in the specified day by the applicant user 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/historysms]

logger

Object private

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

Default: console