API Docs for: 2.6
Show:

plugin_rest_historypostit Class

Module: plugins_rest
Parent Module: com_postit_rest

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

GET requests

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

historypostit/interval/:from/:to

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

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"
    }
]

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

Returns the history of the postit created in the interval time by the user 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"
    }
]

historypostit/day/:day

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

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"
    }
]

historypostit/day/:day/:filter

Returns the history of the postit created in the specified day by the user 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 the applicant 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 the applicant 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.

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 the applicant

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

    To get the history of the postit created in the interval time by the applicant 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 the applicant. 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 the applicant 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/historypostit]

logger

Object private

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

Default: console