NorbixApi class

Norbix Api client.

Resources are exposed as direct properties — for example client.apiKeys.someMethod(...) — so callers do NOT navigate a redundant client.xxx.apiKeys namespace.

Constructors

NorbixApi({NorbixConfig? config, HttpDriver? driver, String? env, String? region})
Build a client. Defaults to the public Norbix host. To point at a self-hosted deployment (e.g. https://api.norbix.isidos.lt or http://localhost:5000), pass a NorbixConfig with the desired URL.
NorbixApi.fromEnv({Map<String, String>? overrides, HttpDriver? driver})
Build a client that reads its base URL and credentials from environment variables. Falls back to the public host when the URL var is not set, so callers always get a usable client.
factory

Properties

apiKeys ApiKeysResource
latefinal
auth AuthResource
latefinal
chat ChatResource
latefinal
config NorbixConfig
Currently active configuration. Mutate via setApiKey, setBearerToken, or by passing a new NorbixConfig at construction time.
no setter
database DatabaseResource
latefinal
env String
Project environment all requests target (sent as the norbix-env header). Defaults to PROD.
no setter
files FilesResource
latefinal
hashCode int
The hash code for this object.
no setterinherited
region String?
Norbix region all requests target (sent as the nb-region header and — when the base URL is the SDK default — used to route to the regional host). Null (the default) means no region: no header is sent.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userAuth UserAuthResource
latefinal
users UsersResource
latefinal

Methods

close() → void
Closes the underlying HTTP client. Call when you are done.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setApiKey(String? key) → void
Replace the API key without rebuilding the client.
setBearerToken(String? token) → void
Replace the bearer token without rebuilding the client.
setConfig(NorbixConfig config) → void
Replace the entire configuration. Useful for switching environments (staging <-> production) at runtime.
setEnv(String? env) → void
Switch the project environment for subsequent requests. Pass 'PROD' (or null) to return to production.
setRegion(String? region) → void
Switch the Norbix region for subsequent requests. Pass null to clear it (no header, default host). When the base URL is the SDK default the regional host (https://{region}.api.norbix.ai) is used; a custom base URL is never rewritten. Per-call region arguments still override this for individual requests (header only).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited