AltogicClient class
Dart client for interacting with your backend applications developed in Altogic.
AltogicClient is the main object that you will be using to issue commands to your backend apps. The commands that you can run are grouped below:
- auth : AuthManager - Manage users and user sessions
- endpoint : EndpointManager - Make http requests to your app endpoints and execute associated services
- db : DatabaseManager - Perform CRUD (including lookups, filtering, sorting, pagination) operations in your app database
- queue : QueueManager - Enables you to run long-running jobs asynchronously by submitting messages to queues
- cache : CacheManager - Store and manage your data objects in high-speed data storage layer (Redis)
- task : TaskManager - Manually trigger execution of scheduled tasks (e.g., cron jobs)
- realtime: RealtimeManager - Publish and subscribe (pub/sub) realtime messaging through websockets
Each AltogicClient can interact with one of your app environments
(e.g., development, test, production). You cannot create a single
client to interact with multiple development, test or production
environments at the same time. If you would like to issue commands
to other environments, you need to create additional AltogicClient
objects using the target environment's envUrl
.
Constructors
- AltogicClient(String envUrl, String clientKey, [ClientOptions? options])
-
Create a new client for web applications.
envUrl
The unique app environment base URL which is generated when you create an environment (e.g., development, test, production) for your backend app. You can accessenvUrl
of your app environment from the Environments panel in Altogic designer. Note that, an AltogicClient object can only access a single app environment, you cannot use a development environmentenvUrl
to access a test or production environment. To access other environments you need to create additional Altogic client objects with their respectiveenvUrl
values.clientKey
The client library key of the app. You can create client keys from the App Settings/Client Library panel in Altogic designer. Besides authenticating your client, client keys are also used to define the authorization rights of each client, e.g., what operations they are allowed to perform on your backend app and define the authorized domains where the client key can be used (e.g., if you list your app domains in your client key configuration, that client key can only be used to make calls to your backend from a front-end app that runs on those specific domains)options
Configuration options for the api client Throws an exception ifenvUrl
is not specified or not a valid URL path orclientKey
is not specified
Properties
- auth → AuthManager
-
Returns the authentication manager that can be used to perform user
and session management activities.
no setter
- cache → CacheManager
-
Returns the cache manager which is used to store and manage objects
in Redis cache.
no setter
- db → DatabaseManager
-
Returns the database manager, which is used to perform CRUD (create, read,
update and delete) and run queries in your app's database.
no setter
- endpoint → EndpointManager
-
Returns the endpoint manager which is used to make http requests to
your app endpoints and execute associated services.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- queue → QueueManager
-
Returns the queue manager which is used to submit messages to a
message queue for processing.
no setter
- realtime → RealtimeManager
-
Returns the realtime manager, which is used to publish and subscribe
(pub/sub) messaging through websockets.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → StorageManager
-
Returns the storage manager, which is used to manage buckets and files
of your app.
no setter
- task → TaskManager
-
Returns the task manager which is used to trigger scheduled tasks
(e.g., cron jobs) for execution.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restoreAuthSession(
) → Future< void> - Restore auth session that saved from local storage.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited