API Docs for: 2.6
Show:

plugin_rest_all_histcallernote Class

Module: plugins_rest
Parent Module: com_caller_note_rest

REST plugin that provides history caller note of all users through the following REST API:

GET requests

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

all_histcallernote/day/:day

Returns the history caller note created by all users of the day "day". Date must be expressed in YYYYMMDD format. If an error occurs an HTTP 500 response is returned.

Example JSON response:

[
    {
       "creationdate": "11/06/2014"
       "creationtime": "14:26:12"
       "expirationdate": "12/06/2014"
       "expirationtime": "10:30:00"
       "id": 5
       "public": 1
       "reservation": 0
       "number": "609"
       "creator": "alessandro"
       "text": "test"
    }
]

all_histcallernote/day/:day/:filter

Returns the history caller note created by all users of the day "day" filtering by "filter". Date must be expressed in YYYYMMDD format. If an error occurs an HTTP 500 response is returned.

Example JSON response:

[
    {
       "creationdate": "11/06/2014"
       "creationtime": "14:26:12"
       "expirationdate": "12/06/2014"
       "expirationtime": "10:30:00"
       "id": 5
       "public": 1
       "reservation": 0
       "number": "609"
       "creator": "alessandro"
       "text": "test"
    }
]

all_histcallernote/interval/:from/:to

Returns the history of the caller note created by all users between "from" date to "to" date. Dates must be expressed in YYYYMMDD format. If an error occurs an HTTP 500 response is returned.

Example JSON response:

[
    {
       "creationdate": "11/06/2014"
       "creationtime": "14:26:12"
       "expirationdate": "12/06/2014"
       "expirationtime": "10:30:00"
       "id": 5
       "public": 1
       "reservation": 0
       "number": "609"
       "creator": "alessandro"
       "text": "test"
    }
]

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

Returns the history caller note created by all users between "from" date to "to" date filtering by "filter". Date must be expressed in YYYYMMDD format. If an error occurs an HTTP 500 response is returned.

Example JSON response:

[
    {
       "creationdate": "11/06/2014"
       "creationtime": "14:26:12"
       "expirationdate": "12/06/2014"
       "expirationtime": "10:30:00"
       "id": 5
       "public": 1
       "reservation": 0
       "number": "609"
       "creator": "alessandro"
       "text": "test"
    }
]

Methods

day

(
  • req
  • res
  • next
)

Search the history of the caller note of all users for the specified day, endpoint and optional filter by the following REST api:

day/:endpoint/:day
day/:endpoint/: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 caller note of all users for the specified interval and optional filter 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
)

Sets the authorization architect component.

Parameters:

  • comp Object

    The authorization architect component.

setCompCallerNote

(
  • cn
)

Set caller note architect component.

Parameters:

  • cn Object

    The caller note 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.

compCallerNote

Object private

The caller note architect component used for caller note 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 caller note of all users between "from" date to "to" date. The date must be expressed in YYYYMMDD format

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

    To get the history caller note of all users between "from" date to "to" date filtering by filter. The date must be expressed in YYYYMMDD format

  • day/:day String

    To get the history caller note of all users of the day. The date must be expressed in YYYYMMDD format

  • day/:day/:filter String

    To get the history caller note of all users of the day filtering by filter. The date must be expressed in YYYYMMDD format

IDLOG

String private final

The module identifier used by the logger.

Default: [plugins_rest/all_histcallernote]

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"