var Requests
The var
APIs provide a simple abstraction over the existing
note.update,
note.get, and
note.delete
APIs for managing data stored in
DB Notefiles.
var.delete CellCell+WiFiLoRaWiFi
Deletes Notefiles from a DB Notefile by its name
. Provides a simpler
interface to the
note.delete API.
file
string
The name of the DB Notefile that contains the Note to delete. Default value is
vars.db
.
name
string
The unique Note ID.
{
"req": "var.delete",
"name": "status"
}
J *req = NoteNewRequest("var.delete");
JAddStringToObject(req, "name", "status");
NoteRequest(req);
req = {"req": "var.delete"}
req["name"] = "status"
card.Transaction(req)
Response Members
{}
means success.var.get CellCell+WiFiLoRaWiFi
Retrieves a Note from a DB Notefile. Provides a simpler interface to the note.get API.
file
string
The name of the DB Notefile that contains the Note to retrieve. Default value is
vars.db
.
name
string
The unique Note ID.
{
"req": "var.get",
"name": "status"
}
J *req = NoteNewRequest("var.get");
JAddStringToObject(req, "name", "status");
NoteRequest(req);
req = {"req": "var.get"}
req["name"] = "status"
rsp = card.Transaction(req)
Response Members
text
string
The string-based value stored in the DB Notefile.
value
integer
The numeric value stored in the DB Notefile.
flag
boolean
The boolean value stored in the DB Notefile.
{
"text": "open"
}
var.set CellCell+WiFiLoRaWiFi
Adds or updates a Note in a DB Notefile, replacing the existing body
with
the specified key-value pair where text
, value
, or flag
is the key.
Provides a simpler interface to the
note.update API.
file
string
The name of the DB Notefile that contains the Note to add or update. Default
value is vars.db
.
name
string
The unique Note ID.
text
string (optional)
The string-based value to be stored in the DB Notefile.
value
integer (optional)
The numeric value to be stored in the DB Notefile.
flag
boolean (optional)
The boolean value to be stored in the DB Notefile.
{
"req": "var.set",
"name": "status",
"text": "open"
}
J *req = NoteNewRequest("var.set");
JAddStringToObject(req, "name", "status");
JAddStringToObject(req, "text", "open");
NoteRequest(req);
req = {"req": "var.set"}
req["name"] = "status"
req["text"] = "open"
card.Transaction(req)
Response Members
{}
means success.