API Docs for: 2.6
Show:

plugin_rest_all_historypostit Class

Module: plugins_rest
Parent Module: com_postit_rest

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

GET requests

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

all_historypostit/interval/:from/:to

Returns the history of the postit created in the interval time by all the users.

Example JSON response:

[
    {
       creationdate: "11/06/2014"
       creationtime: "15:37:52"
       readdate: null
       timeread: null
       id: 31
       recipient: "giovanni"
       creator: "alessandro"
       text: "test post-it"
    }
]

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

Returns the history of the postit created in the interval time by all the users filtering the results.

Example JSON response:

[
    {
       creationdate: "11/06/2014"
       creationtime: "15:37:52"
       readdate: null
       timeread: null
       id: 31
       recipient: "giovanni"
       creator: "alessandro"
       text: "test post-it"
    }
]

all_historypostit/day/:day

Returns the history of the postit created in the specified day by all the users.

Example JSON response:

[
    {
       creationdate: "11/06/2014"
       creationtime: "15:37:52"
       readdate: null
       timeread: null
       id: 31
       recipient: "giovanni"
       creator: "alessandro"
       text: "test post-it"
    }
]

all_historypostit/day/:day/:filter

Returns the history of the postit created in the specified day by all the users filtering the results.

Example JSON response:

[
    {
       creationdate: "11/06/2014"
       creationtime: "15:37:52"
       readdate: null
       timeread: null
       id: 31
       recipient: "giovanni"
       creator: "alessandro"
       text: "test post-it"
    }
]

Methods

day

(
  • req
  • res
  • next
)

Search the history postit created 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 postit created by all the users for the specified interval time and optional filter the results by recipient, 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

setCompPostit

(
  • cp
)

Set postit architect component used by postit functions.

Parameters:

  • cp Object

    The postit 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.

compPostit

Object private

The postit architect component used for postit 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 postit created in the interval time by all the users

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

    To get the history of the postit created in the interval time by all the users filtering the results by "recipient" field of db table

  • day/:day String

    To get the history of the postit created 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 postit created in the specified day by all the users filtering the results by "recipient" 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_historypostit]

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"