Static ReadonlyRequestExported RequestError constructor.
Static ReadonlyTokenExported Token constructor.
Static ReadonlyWebExported WebHookError constructor.
Returns a signature for given socket id and user data.
socket id
user data
authentication signature
Returns a signature for given socket id, channel and socket data.
socket id
channel name
Optionaldata: objectadditional socket data
authorization signature
Builds a signed query string that can be used in a request to Pusher.
Optionalbody?: stringrequest body
request method
Optionalparams?: { [key: string]: string }query params
request path
signed query string
Makes a GET request to Pusher, handles the authentication.
Returns a promise resolving to a response, or rejecting to a RequestError.
Optionalparams?: { [key: string]: string }query params
request path
Makes a POST request to Pusher, handles the authentication.
Returns a promise resolving to a response, or rejecting to a RequestError.
Optionalbody?: unknownrequest body
Optionalparams?: { [key: string]: string }query params
request path
Triggers an event.
Channel names can contain only characters which are alphanumeric, '_' or '-' and have to be at most 200 characters long.
Event name can be at most 200 characters long.
Returns a promise resolving to a response, or rejecting to a RequestError.
event name
Optionaldata: unknownevent data, objects are JSON-encoded
Optionalparams: { info?: string; socket_id?: string }additional optional request body parameters
Optionalinfo?: stringa comma separate list of attributes to be returned in the response. Experimental, see https://pusher.com/docs/lab#experimental-program
Optionalsocket_id?: stringid of a socket that should not receive the event
Creates a WebHook object for a given request.
WebHook HTTP headers with lower-case keys
raw WebHook body
Provides access to Pusher's REST API, WebHooks and authentication. Modified to work with React Native, source: https://github.com/pusher/pusher-http-node
Param: options
Param: options.host
API hostname
Param: options.useTLS
whether to use TLS
Param: options.encrypted
deprecated; renamed to
useTLSParam: options.port
port, default depends on the scheme
Param: options.appId
application ID
Param: options.key
application key
Param: options.secret
application secret
Param: options.timeout
request timeout in milliseconds
Param: options.agent
http agent to use