The WebSocket API for the Mastodon Social Network.
An event received over the websocket.
NoEvent, UpdateEvent, NotificationEvent, DeleteEvent, and
FiltersChangedEvent come over the wire as specified at
https://docs.joinmastodon.org/api/streaming.
ConnectedEvent is delivered as soon as the initial connection is made, right
after your send a PortFunnels.WebSocket.makeOpen message over the socket.
ReconnectedEvent is delivered if the connection is lost and auto-reconnected.
ClosedEvent is delivered if the reconnection fails, or you explicitly send
a PortFunnels.WebSocket.makeClose message.
Convert a streaming API (e.g. "rss://mastodon.social"), access token, and stream type into a URL for the WebSocket connection.
streamUrl streaming_api accessToken streamTypeIf accessToken is Nothing, will attempt to connect without authentication. This works for the following StreamTypes: [TODO]
Open a WebSocket connection.
open state key urlstate is initially the result of WebSocket.PortFunnels.initialState.
key is a unique key string.
url is the result of a call to streamUrl.
Close a socket opened with open.
close state keyDecode a string from the WebSocket stream.
The JSON decoder for a non-colon event.
You'll usually use decodeEvent on the string that comes over the WebSocket."
Stream types.
Use
streamingUrlto convert one of these into a url string.The
Stringarg toPublicHashtagStreamandLocalHashtagStreamis a hashtag.The
Stringarg toListStreamis a list ID.The
Stringarg toGroupStreamis a group ID. Groups are currently supported only by the Gab server code.