Sinix API - sinix-dev/sinix.js GitHub Wiki

DB Functions

  • db.create() - Create a database
  • db.load() - Load an existing database
  • db.query() - Query database
  • db.contains() - Return specific item that contains
  • db.update_item() - Update/replace item
  • db.remove_item() - Delete item
  • db.read_db() - Get all items
  • db.dump_db() - Dump database

Remote Functions

  • remote.all() - Get all users
  • remote.disconnect(username) - Disconnect specific user
  • remote.listen(user, event, () => {}) - Listen for specific event by specific user

Payload

{
  "event_type": "DB|REMOTE",
  "payload": {
    "action": "create",
    "data": {}
  }
}

References