Create a new SimpleGunAPI instance.
The DataBase instance to use.
Get a chainable wrapper for a Gun node at a given path.
The path to the node.
An object with chainable methods: get, put, set, once, then, map.
Get data at a given path.
The path to retrieve data from.
The data at the path, or null if not found or on error.
Advanced user space operations
Private
getGet the current user info.
The current user info, or null if not logged in.
Get the GunDB global node at a given path. Useful for advanced operations that need direct GunDB node access.
The path to the global node.
The Gun node.
Private
getGet the Gun node at a given path for chaining operations.
The path to the node.
The Gun node.
Get user info by alias.
The user alias.
The user info, or null if not found.
Get user data at a given path (requires login).
The path to the user data.
The user data, or null if not found or on error.
Check if a user is currently logged in.
True if logged in, false otherwise.
Log in a user.
The username.
The password.
The user info if successful, or null.
Log out the current user.
Get the Gun node at a given path for direct chaining.
The path to the node.
The Gun node.
Put data at a given path.
The path to put data to.
The data to put.
The GunMessagePut result.
Put user data at a given path (requires login).
The path to put data to.
The data to put.
True if successful, false otherwise.
Remove data at a given path.
The path to remove data from.
The GunMessagePut result.
Remove user data at a given path (requires login).
The path to remove data from.
True if successful, false otherwise.
Set data at a given path (alternative to put).
The path to set data to.
The data to set.
The GunMessagePut result.
Set user data at a given path (alternative to put, requires login).
The path to set data to.
The data to set.
True if successful, false otherwise.
Sign up a new user.
The username.
The password.
The user info if successful, or null.
Check if a user exists by alias.
The user alias.
True if the user exists, false otherwise.
Simple API wrapper that provides common operations with minimal complexity.