Simulation variables can be found in the documentation here:
https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Simulation_Variables.htm
Events can be found here:
https://docs.flightsimulator.com/html/Programming_Tools/Event_IDs/Event_IDs.htm
Get
this.$api.variables.get(var_name, unit)
// Sim Variable: this.$api.variables.get('A:BRAKE PARKING POSITION', 'bool')
// L: Variable: this.$api.variables.get('L:P42_FF_SWITCH_TENT', 'number')
var_name
: (String) The name of the variable to readunit
: (String) The unit of the variable to read
Set variable/event
this.$api.variables.set(var_name, unit, value)
// Sim Variable: this.$api.variables.set('A:LIGHT LANDING', 'bool', 1)
// L: Variable: this.$api.variables.set('L:P42_FF_SWITCH_TENT', 'number', 1)
// Event: this.$api.variables.set('K:PARKING_BRAKE_SET', 'bool', 1)
var_name
: (String) The name of the variable to writeunit
: (String) The unit of the variable to writevalue
: (Number) The value of the variable to write