Show:

Streams.Subscription Class

Extends Base.Streams.Subscription
Module: Streams

Class representing 'Subscription' rows in the 'Streams' database
{"type": [ array of message types ], "notifications": 5}

Constructor

Streams.Subscription

(
  • fields
)

Parameters:

  • fields Object

    The fields values to initialize table row as an associative array of {column: value} pairs

Item Index

Methods

Methods

setUp

()

The setUp() method is called the first time an object of this class is constructed.

test

(
  • userId
  • publisherId
  • stream
  • callback
)
static

Test message according to filters set up for the user and generate array of subscription rules

Parameters:

  • userId String
  • publisherId String
  • stream Q.Streams.Stream
  • callback Function

    First argument is any possible error, second is array of delivery methods