Table of Contents

Class MassiveClientOptions

Namespace
MassiveDotNet
Assembly
MassiveDotNet.dll

Configuration for a Massive API client.

public sealed class MassiveClientOptions
Inheritance
MassiveClientOptions
Inherited Members

Properties

ApiKey

The API key used to authenticate requests. Required.

public string? ApiKey { get; set; }

Property Value

string

AuthenticationScheme

How the API key is presented to the server. Defaults to BearerToken.

public MassiveAuthenticationScheme AuthenticationScheme { get; set; }

Property Value

MassiveAuthenticationScheme

BaseAddress

The base address requests are issued against. Defaults to Production.

public Uri BaseAddress { get; set; }

Property Value

Uri

RateLimit

Client-side throttling, or null to send requests as fast as the caller issues them. Off by default.

public MassiveRateLimitOptions? RateLimit { get; set; }

Property Value

MassiveRateLimitOptions

Remarks

Assigning an instance is the whole opt-in: options.RateLimit = new MassiveRateLimitOptions { PermitsPerWindow = 5 }. The SDK cannot infer a key's entitlement, so it never throttles unless asked (D30).

Retry

Bounded retry for HTTP 429, 5xx and a broken connection, or null to surface the first failure. Off by default.

public MassiveRetryOptions? Retry { get; set; }

Property Value

MassiveRetryOptions

Remarks

Assigning an instance is the whole opt-in: options.Retry = new MassiveRetryOptions(). Retry is separate from RateLimit because the two solve different problems — a caller on a paid tier may want to ride out a transient 502 without pacing their requests at all (D30).

Timeout

The per-request timeout. Defaults to 100 seconds, matching HttpClient's own default.

public Duration Timeout { get; set; }

Property Value

Duration

Remarks

A NodaTime Duration rather than a BCL TimeSpan, per constitution rule 12. It is converted at the HttpClient boundary inside MassiveHttpTransport, and is ignored when the transport is constructed over a caller-supplied HttpClient, since that client carries its own timeout.

With Retry set it is a budget for the whole call, not for each attempt: every retry and every backoff runs inside it, and a call that runs out is not retried.

UserAgent

An optional product token appended to the User-Agent header.

public string? UserAgent { get; set; }

Property Value

string

Methods

Validate()

Throws if the options are not in a usable state.

public void Validate()

Exceptions

InvalidOperationException

The API key is missing, the base address is not absolute, or a configured RateLimit or Retry holds a value it cannot act on.