Show:

Users.Mobile Class

Extends Base.Users.Mobile
Module: Users

Class representing 'Mobile' rows in the 'Users' database

Constructor

Users.Mobile

(
  • fields
)

Parameters:

  • fields Object

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

Item Index

Methods

Methods

sendMessage

(
  • to
  • view
  • [fields={}]
  • [options]
  • callback
)
static

Send sms message. Use 'Users/twilio' config. Requires valid twilio SID and TOKEN as well as twilio phone number either in the config or within options

Parameters:

  • to String

    phone number

  • view String

    The name of a view for the body. Fields are passed to it.

  • [fields={}] Array optional

    The fields referenced in the subject and/or view

  • [options] Object optional
    • [from] String optional

      A phone number acceptable by twilio.

    • [isSource] Boolean optional

      If true, uses Q.Handlebars.renderSource instead of render

  • callback Function

    Receives error, method used and and response objects after complete

sendMessage

(
  • view
  • fields={}
  • options={}
  • callback
)

Parameters:

  • view String

    The name of a view for the message. Fields are passed to this array.

  • fields={} Array

    Optional. The fields referenced in the subject and/or view

  • options={} Array

    Optional. Array of options. Doesn't include anything yet.

  • callback Function

    Receives error and response objects after complete

setUp

()

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