Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KiiPushMessageBuilder

Builder of push message

Hierarchy

  • KiiPushMessageBuilder

Index

Constructors

Methods

  • Set alert for APNS subscribers. If this method is not called, no alert is applied. For details please refer to APNS document of alert.

    Parameters

    • alert: any

      alert object

    Returns KiiPushMessageBuilder

    builder instance.

  • Set badge for APNS subscribers. If this method is not called, no badge is applied. For details please refer to APNS document of badge.

    Parameters

    • badge: number

    Returns KiiPushMessageBuilder

    builder instance.

  • Set category for APNS subscribers. If this method is not called, no category is applied. For details please refer to APNS document of category.

    Parameters

    • category: string

    Returns KiiPushMessageBuilder

    builder instance.

  • Set content-available for APNS subscribers. If this method is not called, no content-available is applied.

    Parameters

    • contentAvailable: number

      If eqaul or less than 0 or this method is not invoked, content-available payload is not delivered. Otherwise, content-available=1 payload is delivered.

    Returns KiiPushMessageBuilder

    builder instance.

  • Set specific data for APNS subscribers. If this method is not called, no specific data is not applied and data passed to the constructor would be sent to subscribers.

    Parameters

    • data: any

      specific data applied to only APNS subscribers. Contents should be JSON Object with only one-level of nesting, and only strings, integers, booleans or doubles in the values.

    Returns KiiPushMessageBuilder

    builder instance.

  • Set mutable-content for APNS subscribers. If this method is not called, no mutable-content is applied.

    Parameters

    • mutableContent: number

      If equal or less than 0 or this method is not invoked, mutable-content payload is not delivered. Otherwise, mutable-content=1 payload is delivered.

    Returns KiiPushMessageBuilder

    builder instance.

  • Set sound for APNS subscribers. If this method is not called, no sound is applied. For details please refer to APNS document of sound.

    Parameters

    • sound: string

    Returns KiiPushMessageBuilder

    builder instance.

  • build(): any
  • Enable/ Disable message distribution via APNS. If this method is not called, true will be applied as default.

    Parameters

    • enable: boolean

      flag indicate whether distribute this message to APNS subscribers.

    Returns KiiPushMessageBuilder

    builder instance.

  • Enable/ Disable message distribution via GCM. If this method is not called, true will be applied as default.

    Parameters

    • enable: boolean

      flag indicate whether distribute this message to GCM subscribers.

    Returns KiiPushMessageBuilder

    builder instance.

  • Enable/ Disable message distribution via JPush. If this method is not called, true will be applied as default.

    Parameters

    • enable: boolean

      flag indicate whether distribute this message to JPush subscribers.

    Returns KiiPushMessageBuilder

    builder instance.

  • Enable/ Disable message distribution via MQTT. If this method is not called, true will be applied as default.

    Parameters

    • enable: boolean

      flag indicate whether distribute this message to MQTT subscribers.

    Returns KiiPushMessageBuilder

    builder instance.

  • Set collapse_key for GCM subscribers. If this method is not called, no collapse_key is applied. For details please refer to GCM document of collapse_key.

    Parameters

    • collapseKey: string

    Returns KiiPushMessageBuilder

    builder instance.

  • Set specific data for GCM subscribers. If this method is not called, no specific data is not applied and data passed to the constructor would be sent to subscribers.

    Parameters

    • data: any

      specific data applied to only GCM subscribers. Contents should be JSON Object with only one-level of nesting, and only strings in values

    Returns KiiPushMessageBuilder

    builder instance.

  • Set delay_while_idle for GCM subscribers. If this method is not called, no delay_while_idle is applied. For details please refer to GCM document of delay_while_idle.

    Parameters

    • delayWhileIdle: boolean

    Returns KiiPushMessageBuilder

    builder instance.

  • Set restricted_package_name for GCM subscribers. If this method is not called, no restricted_package_name is applied. For details please refer to GCM document of restricted_package_name.

    Parameters

    • restrictedPackageName: string

    Returns KiiPushMessageBuilder

    builder instance.

  • Set time_to_live for GCM subscribers. If this method is not called, no time_to_live is applied. For details please refer to GCM document of time_to_live.

    Parameters

    • timeToLive: number

    Returns KiiPushMessageBuilder

    builder instance.

  • Set specific data for JPush subscribers. If this method is not called, no specific data is not applied and data passed to the constructor would be sent to subscribers.

    Parameters

    • data: any

      specific data applied to only JPush subscribers. Contents should be JSON Object with only one-level of nesting, and only strings, integers, booleans or doubles in the values.

    Returns KiiPushMessageBuilder

    builder instance.

  • Set specific data for MQTT subscribers. If this method is not called, no specific data is not applied and data passed to the constructor would be sent to subscribers.

    Parameters

    • data: any

      specific data applied to only MQTT subscribers. Contents should be JSON Object with only one-level of nesting, and only strings in the values.

    Returns KiiPushMessageBuilder

    builder instance.

  • Indicate whether send this message to development environment. If this method is not called, true will be applied as default.

    Parameters

    • flag: boolean

      indicate whether send this message to development env.

    Returns KiiPushMessageBuilder

    builder instance.

  • Indicate whether send this message to production environment. If this method is not called, true will be applied as default.

    Parameters

    • flag: boolean

      indicate whether send this message to production env.

    Returns KiiPushMessageBuilder

    builder instance.

Generated using TypeDoc