OptionalaccountName: string
Account name, or omit for the token's own account.
Omit accountName to get the account the configured API token belongs to. Use this when you do
not care which kind of account it is — every member a caller normally wants is shared between
the two. Use App.getUser or App.getGroup to insist on one kind.
Every account on the instance, as an iterator that fetches pages as you consume it.
The configuration this object was created with.
The configuration as given, except that url is always set: it is resolved from the
token when one was passed without a URL.
The API this object talks to. Always set, even when the config was given without one.
The group with this name.
If no account with this name exists, or if the name belongs to a User rather than a group. Use App.getAccount when it could be either.
The instance's own configuration: its branding, URLs and the limits it enforces.
The user with this name.
OptionalaccountName: string
User name, or omit for the token's own user.
Omit accountName to get the user the configured API token belongs to — the usual way to reach
your own account.
If no account with this name exists, or if the name belongs to a Group rather than a user. Use App.getAccount when it could be either.
Whether the instance is at least this version.
The lowest version that will do.
true when the instance is new enough, and also for an instance that reports its
version as unset, which development builds do.
StaticgetConnects to a TriplyDB instance.
Optionalconf: string | AppConfig
Connection settings, or a bare string used as AppConfig.token.
The only way to make an App — the constructor is private. Nothing is contacted here: the first request happens when you call a method that needs one, so a wrong URL surfaces then rather than now. A malformed token, though, is rejected immediately.
The entry point to a TriplyDB instance, and the root of every other object in this library.
Remarks
Create one with the static
App.getfactory; the constructor is not public. All other objects are reached from here, starting with App.getAccount or App.getUser.Example: Connect with a token, and read the account it belongs to
Example: Read public data without a token, naming the instance