api library

Libraries for creating custom connection implementations This library is used for development so exposes almost all structures of the package

Classes

AuthorizationDelegate
Special interface designed to return auth string with authenticationString Used by PrivateChannel to get auth string to subscribe
Channel
An interface to represent the channels based on the Pusher documentation
ChannelReadEvent
Implementation of ReadEvent recieved from Channel
ConnectionDelegate
Special interface to describe connection, recieveing and sending events
Event
Class to describe events of Pusher Channels For more information: https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol/#subscription-events
PrivateChannel
Implementation of pusher private channels using AuthorizationDelegate to get auth code for subscribing through authenticaton middleware.
PublicChannel
Implementation of pusher public channels
PusherChannelOptions
Options provided to ConnectionDelegate. See:
PusherChannelsClient
Canonical client structure to connect to a server based on Pusher Channels protocol through ConnectionDelegate, generating and managing channels internally
PusherChannelsOptions
Options provided to ConnectionDelegate. See:
PusherChannelsPackageConfigs
Package configurations.
PusherChannelsPackageLogger
Logger that used across all the package.
PusherEventNames
Constant event names of Pusher Channels
PusherReadEvent
Read events from pusher
ReadEvent
Instances of ReadEvent can only be used to read.
RecieveEvent
Special type of ReadEvent that accepts RecieveEventPredicate Then accepted onEventRecieved can be called with callHandler
SendEvent
Events sent to a server

Enums

ConnectionStatus
Used to describe connection status to a server by ConnectionStatus

Functions

defaultAuthCodeParser(Response response) FutureOr<String>

Typedefs

LogHandler = void Function(Object? o)
RecieveEventPredicate = void Function(String name, String? channelName, Map data)

Exceptions / Errors

PusherAuthenticationException
Exception that is supposed to be thrown when AuthorizationDelegate fails to get auth tring It is recommended to create separate implementations for each AuthorizationDelegate