Hierarchy (View Summary)

Constructors

Properties

apiBaseUrl: string
auth: Auth
endpoint: string = '/api/fcm'
endpointSingleton: string = '/api/fcm'

Methods

  • Parameters

    • endpoint: string
    • method: string
    • data: any

    Returns Promise<any>

  • Parameters

    • endpoint: string
    • metadatas: Metadatas
    • query: null | { [key: string]: any }

    Returns Promise<any>

  • Send a message to a specific device

    Parameters

    • deviceToken: string

      The device token to send the message to

    • payload: FcmMessagePayload

      The message payload

    Returns Promise<any>

    Promise with the send result

  • Subscribe to a topic

    Parameters

    • topic: string

      The topic to subscribe to

    • deviceToken: string

      The device token to include in the payload

    • options: object = {}

      Additional options to include in the payload

    Returns Promise<any>

    Promise with the subscription result

  • Unsubscribe from all topics for a device

    Parameters

    • deviceToken: string

      The device token to unsubscribe from all topics

    Returns Promise<any>

    Promise with the unsubscription result

  • Unsubscribe from a topic

    Parameters

    • topic: string

      The topic to unsubscribe from

    • deviceToken: string

      The device token to include in the payload

    • options: object = {}

      Additional options to include in the payload

    Returns Promise<any>

    Promise with the unsubscription result