altogic_dart library
Support for doing something awesome.
More dartdocs go here.
Classes
- Agent
- The user-agent (device) information of the user's session.
- AltogicClient
- Dart client for interacting with your backend applications developed in Altogic.
- APIBase
- The base class where all manager classes are derived from.
-
APIResponse<
T> - All API request returns a APIResponse.
- APIResponseBase
- All API responses are wrapped in this class.
- AppendOptions
- Defines the options for an object append operation
- AuthManager
- Handles the authentication process of your application users. Provides methods to manage users, sessions and authentication.
- AuthState
- User Authentication Status
- BucketListOptions
- Defines the structure how to get app buckets
- BucketManager
- BucketManager is primarily used to manage a bucket and its contents (e.g., files, documents, images). Using the StorageManager.bucket method, you can create a BucketManager instance for a specific bucket identified by its unique name or id.
- BucketSortEntry
- Defines the structure of a bucket sort entry
- CacheManager
- The cache manager provides simple key-value storage at a high-speed data storage layer (Redis) speeding up data set and get operations.
- ClientOptions
- The options that can be passed to the Altogic client instance
- ClientStorage
- Client local storage handler definition.
- ComplexLookup
- Defines the structure of a complex lookup
- CreateOptions
- Defines the options for an object create operation
- DatabaseManager
- The database manager allows you manage your applications database. With DatabaseManager you can create new objects in your data model, update or delete existing ones, run queries and paginate over large data sets.
- DBAction
- Defines the structure of a db action that is built by a QueryBuilder
- DBObject
- References an object stored in a specific model of your application. It provides the methods to get, update, delete an existing object identified by its id or create, set or append a new object.
-
DbOperationOptions<
T> - DB Operation options abstraction.
- DeleteInfo
- Defines the structure of the response of a multi-object delete operation in the database
- DeleteOptions
- Defines the options for an object delete operation
- EndpointManager
- Provides the methods to execute your app backend services by making http request to your app endpoints.
- ErrorEntry
- Provides info about an error.
- Fetcher
- HTTP client for the browser, Node or React Native. Created by AltogicClient during initialization. The client library uses cross-fetch under the hood to make requests to you app's execution environment.
- FieldUpdate
- Defines the structure of a field update
- FileListOptions
- Defines the structure how to get the files of a bucket
- FileManager
- FileManager is primarily used to manage a file. Using the BucketManager.file method, you can create a FileManager instance for a specific file identified by its unique name or id.
- FileSort
- Defines the structure of a file sort entry
- FileUploadOptions
- Defines the options available that can be set during file upload
- FutureApiResponse
- All methods of EndpointManager return FutureApiResponse.
- GetOptions
- Defines the options for an object read operation
- GroupComputation
- Defines the structure of grouped object computations. Basically, it provides aggregate calculation instructions to QueryBuilder.compute method
- KeyListResult
- Cached keys list response. Same as APIResponse, If response success, errors will be null and data will not.
- Lookup
- Look up (left outer join) the specified field SimpleLookup of the model or perform specified lookup query ComplexLookup when getting data form the database.
- MemberData
- Defines the structure of the channel member data.
- MessageInfo
- Provides info about the status of a message that is submitted to a queue.
- QueryBuilder
- The query builder is primarily used to build database queries or run CRUD operations on a model (i.e., table, collection) of your application.
- QueueManager
- The queue manager allows different parts of your application to communicate and perform activities asynchronously.
- RealtimeManager
- The realtime manager allows realtime publish and subscribe (pub/sub) messaging through websockets.
- RealtimeOptions
- The options that can be passed to the client instance realtime module
- RealtimeUrlConfig
- Parsed environment url components
- Session
- Keeps session information of a specific user
- SessionResult
- AuthManager.getAllSessions response.
- SetOptions
- Defines the options for an object set operation
- SimpleLookup
- Defines the structure of a simple lookup.
- SortEntry
- Defines the structure of sort entry
- StorageManager
- Allows you manage your app's cloud storage buckets and files. With StorageManager you can create and list buckets and use the BucketManager to manage a specific bucket and and its contained files.
- TaskInfo
- Provides info about the status of a task that is triggered for execution.
- TaskManager
- The task manager allows you to manually trigger service executions of your scheduled tasks which actually ran periodically at fixed times, dates, or intervals.
- UpdateInfo
- Defines the structure of the response of a multi-object update operation in the database
- UpdateOptions
- Defines the options for an object update operation
- User
- Provides info about a user.
- UserAgent
- The user-agent (device) information of the user's session.
- UserResult
- AuthManager.changeEmail , AuthManager.changePhone and AuthManager.getUserFromDB returns this class.
- UserSessionResult
- Hold User and Session. Same as APIResponse, If response success, errors will be null.
Enums
- BucketSortField
- Cache
- Direction
- FileSortField
- GroupComputationType
- MessageStatus
- Message Status
- Method
- Http Method
- ResolveType
- UpdateType
- Defines how the field will be updated.
- UserEvent
Constants
- awaitTimeout → const int
- DEFAULT_APPEND_OPTIONS → const AppendOptions
- Default AppendOptions for DBObject.append
- DEFAULT_CREATE_OPTIONS → const CreateOptions
- Default CreateOptions for DBObject.create
- DEFAULT_DELETE_OPTIONS → const DeleteOptions
- Default DeleteOptions for DBObject.delete
- DEFAULT_FILE_OPTIONS → const FileUploadOptions
- DEFAULT_GET_OPTIONS → const GetOptions
- Default GetOptions for DBObject.get
- DEFAULT_SET_OPTIONS → const SetOptions
- Default SetOptions for DBObject.set
- DEFAULT_UPDATE_OPTIONS → const UpdateOptions
- Default UpdateOptions for DBObject.update
- getParamValue → const dynamic Function(String param)
- INVALID_SESSION_TOKEN → const String
- MISSING_SESSION_TOKEN → const String
- reconnectionDelay → const int
- timout → const int
Functions
-
checkRequired(
String fieldName, dynamic fieldValue, {bool checkEmptyString = true}) → void - Checks if the input string is valid.
-
createClient(
String envUrl, String clientKey, [ClientOptions? options]) → AltogicClient -
Creates a new client to interact with your backend application developed in
Altogic. You need to specify the
envUrl
andclientKey
to create a new client object. You can create a new environment or access your appenvUrl
from the Environments view and create a newclientKey
from App Settings/Client library view in Altogic designer. -
encodeUriParameters(
Map< String, dynamic> queryParameters) → String -
normalizeUrl(
String url) → String - Normalizes the input url string by trimming spaces and removing any trailing slash character.
-
parseRealtimeEnvUrl(
String envUrl) → RealtimeUrlConfig - Parses the env url and returns its components
-
removeTrailingSlash(
String uri) → String - Removes trailing slash character from input url string.
Typedefs
- EventCallback = void Function(dynamic data)
-
JsonList
= List<
Map< String, dynamic> > - A List<Map<String,dynamic>> type.
-
JsonMap
= Map<
String, dynamic> - A Map<String,dynamic> type.
- OnUploadProgress = void Function(int total, int uploaded, double percentComplete)
-
uploaded
Total bytes uploadedtotal
Total size of file in bytespercentComplete
Percent uploaded (an integer between 0-100), basicallyuploaded/total
rounded to the nearest integer - UserEventListenerFunction = void Function(UserEvent eventName, Session? session)
- Defines the structure of listener (callback) functions for user generated events (messages).
Exceptions / Errors
- APIError
- Provides information about the errors happened during execution of the requests
- ClientError
- Class to create and throw instances of client errors during runtime.