Class FluxerConfig
Configuration class for the Fluxer.Net library. Controls behavior for both ApiClient and GatewayClient including endpoints, reconnection, logging, rate limiting, and gateway event handling.
public class FluxerConfig
- Inheritance
-
objectFluxerConfig
Properties
AdminUrl
Get the admin url.
public string AdminUrl { get; set; }
Property Value
ApiBaseUrl
Base URL for the Fluxer REST API. The {v} placeholder is replaced with Version. Defaults to "https://api.fluxer.app/v{v}/".
public string ApiBaseUrl { get; set; }
Property Value
EnableRateLimiting
Enable client-side rate limiting using a sliding window algorithm. Defaults to true. When enabled, API requests automatically wait when approaching rate limits to prevent 429 responses from the server. See RateLimiting/README.md for details.
public bool EnableRateLimiting { get; set; }
Property Value
GatewaySerilog
Custom Serilog logger configuration for the library. If null, the library will use the application's existing Serilog configuration. Allows for separate log levels and sinks for Fluxer.Net operations.
public ILogger? GatewaySerilog { get; set; }
Property Value
- ILogger
GatewayUrl
WebSocket gateway URL for real-time event streaming. Must use JSON encoding. Compression is not currently supported. Defaults to "wss://gateway.fluxer.app/?v=1&encoding=json".
public string GatewayUrl { get; set; }
Property Value
GiftUrl
Get the gift url.
public string GiftUrl { get; set; }
Property Value
HttpClient
Optional HttpClient instance to use for API requests. If null, a new HttpClient will be created. Providing your own HttpClient allows for connection pooling, custom headers, and proxy configuration.
public HttpClient HttpClient { get; set; }
Property Value
IgnoredGatewayEvents
List of gateway event dispatch types to ignore. Useful for filtering out high-volume events your application doesn't need (e.g., "PRESENCE_UPDATE", "TYPING_START"). Defaults to empty list.
public List<string> IgnoredGatewayEvents { get; set; }
Property Value
InviteUrl
Get the invite url.
public string InviteUrl { get; set; }
Property Value
MediaUrl
Get the media/user content url.
public string MediaUrl { get; set; }
Property Value
Presence
Initial presence data to send when connecting to the gateway. If null, no presence is sent. Allows setting your bot's or user's online status, activity, and other presence information.
public PresenceUpdateGatewayData? Presence { get; set; }
Property Value
Proxy
Proxy used for the rest/http client.
public IWebProxy? Proxy { get; set; }
Property Value
RealApiBaseUrl
Gets the fully resolved API base URL with the version number substituted. This is the actual URL used for API requests.
public string RealApiBaseUrl { get; }
Property Value
ReconnectAttemptDelay
Number of seconds to wait between gateway reconnection attempts. Defaults to 10 seconds.
public int ReconnectAttemptDelay { get; set; }
Property Value
RestSerilog
Custom Serilog logger configuration for the library. If null, the library will use the application's existing Serilog configuration. Allows for separate log levels and sinks for Fluxer.Net operations.
public ILogger? RestSerilog { get; set; }
Property Value
- ILogger
StaticUrl
Get the static content url.
public string StaticUrl { get; set; }
Property Value
Version
API version number to use. Defaults to 1, which is currently the only supported version. This value replaces the {v} placeholder in ApiBaseUrl.
public int Version { get; set; }
Property Value
WebUrl
Get the web url.
public string WebUrl { get; set; }