Table of Contents

Class FluxerClient

Namespace
Fluxer.Net
Assembly
Fluxer.Net.dll

Client used for connecting to the Fluxer API and Gateway.

public class FluxerClient : FluxerBaseClient
Inheritance
object
FluxerClient
Inherited Members

Constructors

FluxerClient(string, FluxerConfig?)

Create a Fluxer client.

public FluxerClient(string token, FluxerConfig? config = null)

Parameters

token string
config FluxerConfig

Properties

Gateway

Gateway client for Fluxer with events.

public FluxerGatewayClient Gateway { get; }

Property Value

FluxerGatewayClient

Rest

Http client for Fluxer with requests.

public FluxerApiClient Rest { get; }

Property Value

FluxerApiClient

Token

Token for the current user.

public string Token { get; }

Property Value

string

Methods

LoginAsync(string)

This will update your config urls to use the instance.

public Task<Instance> LoginAsync(string apiUrl = null)

Parameters

apiUrl string

Returns

Task<Instance>

Exceptions

ArgumentNullException
Exception

StartAsync()

Start the gateway session to recieve events.

public Task StartAsync()

Returns

Task

UseCanary()

Use canary features for the API.

public FluxerClient UseCanary()

Returns

FluxerClient

ValidateToken(string)

Validates that the token has a recognized prefix for the Fluxer API.

public static void ValidateToken(string token)

Parameters

token string

The token to validate.

Exceptions

ArgumentException

Thrown when the token is null, empty, or does not begin with a valid prefix. Bot tokens must start with Bot (including the trailing space). User tokens must start with flx_.