twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks

LegacyAdapter

A WebHook connection adapter to support the "old style" options.

Overview

Methods

Methods

create(config)

staticasync

Takes the legacy WebHookListenerConfig and creates a connection adapter from it.

ParameterTypeRequiredDefaultDescription
configWebHookListenerConfignonesee below
config.hookValiditynumbernone

Default validity of a WebHook, in seconds.

Please note that this doesn't mean that you don't get any notifications after the given time. The hook will be automatically refreshed.

This is meant for debugging issues. Please don't set it unless you know what you're doing.

config.hostNamestringnone

The host name the server will be available under.

This is not an URL, but a plain host name, so it shouldn't contain http:// or https:// or any slashes.

If not given, your IPv4 address will be automatically determined using a web service.

config.loggerPartial<LoggerOptions>none

Options to pass to the logger.

config.portnumbernone

The port the server should listen to, and unless reverseProxy configuration is given, also the port it's available under.

If not given, a free port will be automatically determined.

config.reverseProxyWebHookListenerReverseProxyConfignone

Configuration of a reverse proxy that the listener may be behind.

config.reverseProxy.pathPrefixstringnone

The path prefix your reverse proxy redirects to the listener.

Please keep in mind that this prefix needs to be stripped from the URL in order for the listener to work properly.

For example, if you make your reverse proxy redirect any requests to https://twitchapp.example.com/hooks to the listener, the proxy needs to transform the URL from /hooks/:name to /:name.

config.reverseProxy.portnumbernone

The port your reverse proxy is available under.

config.reverseProxy.sslbooleannone

Whether your reverse proxy is available using SSL on the given port.

config.sslWebHookListenerCertificateConfignone

The SSL keychain that should be used to make the server available using a secure connection.

If this is not given and config.reverseProxy.ssl is not true, the server will only be available via HTTP. This means it can only listen to unauthenticated topics (stream changes and follows).

config.ssl.certstringnone

Your full SSL certificate chain, including all intermediate certificates.

config.ssl.keystringnone

The private key of your SSL certificate.

Return type: LegacyAdapter