Interface amplifyStatic

Index

Properties

Methods

Properties

public request: amplifyRequest

public store: amplifyStore

public subscribe: amplifySubscribe

Methods

public publish(topic: string, args?: Array<any>): boolean

Publish a message. topic: The name of the message to publish. Any additional parameters will be passed to the subscriptions. amplify.publish returns a boolean indicating whether any subscriptions returned false. The return value is true if none of the subscriptions returned false, and false otherwise. Note that only one subscription can return false because doing so will prevent additional subscriptions from being invoked.

Parameters

  • topic: string
  • args?: Array<any> optional

Returns

boolean

public unsubscribe(topic: string, callback: Function)

Remove a subscription. topic: The topic being unsubscribed from. callback: The callback that was originally subscribed.

Parameters

  • topic: string
  • callback: Function