InoDrive / UserApp / getVariable


InoDrive.UserApp.getVariable()

Gets the input variable by name and returns all of the information about it

Arguments:
argv (String) Argument to get Variable, either it’s Name or ID.

Returns: Variable Information (Object) An Object Containing the ID, Type, Access Level, Value and Write Permission of the variable that you’ve passed in

// Import InoDrive API Library
import { InoDriveApiJS }  from "ck-inodrive-api" 

// Instatiate the API
let InoDriveApi = new InoDriveApiJS.InoDriveApi({ connectAppUrl: "", secure: false })

// Instantiate InoDrive Object
let Drive = await InoDriveApi.InoDrive({ target: "Name", autoConnect: true })

// Retrieve Variable by Name
Drive.UserApp.getVariable("TestVariable")

// or Retrieve Variable by ID
console.log(Drive.UserApp.getVariable(0))