Skip to content

Instantly share code, notes, and snippets.

@worksofliam
Last active August 10, 2020 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save worksofliam/d3286e29cb8a92af1c690389cb3bb066 to your computer and use it in GitHub Desktop.
Save worksofliam/d3286e29cb8a92af1c690389cb3bb066 to your computer and use it in GitHub Desktop.
{
"variables": [
{
"type": "subitem",
"name": "GEOTAB_TOKEN",
"keywords": [
"VARCHAR(256)",
"TEMPLATE"
],
"comments": "Used to store the current token from Geotab."
}
],
"procedures": [
{
"type": "procedure",
"name": "GEOTAB_SUCCESSFUL",
"keywords": [
"IND",
"EXTPROC"
],
"comments": "Used to determine if a call to the API was successful",
"subItems": [
{
"type": "subitem",
"name": "PRESULT",
"keywords": [
"POINTER",
"OPTIONS(*NOPASS)"
],
"comments": "Optionally the resulting JSON object"
}
]
},
{
"type": "procedure",
"name": "GEOTAB_AUTH",
"keywords": [
"LIKE(GEOTAB_TOKEN)",
"EXTPROC"
],
"comments": "Used to authenticate to Geotab. Returns a JSON string which needs to be used in other procedures following the Auth. The token can be reused in many jobs.",
"subItems": [
{
"type": "subitem",
"name": "PDATABASE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": ""
},
{
"type": "subitem",
"name": "PUSERNAME",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": ""
},
{
"type": "subitem",
"name": "PPASSWORD",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": ""
}
]
},
{
"type": "procedure",
"name": "GEOTAB_CLOSE",
"keywords": [
"EXTPROC"
],
"comments": "Used to free memory allocated by the JSON parser/generator",
"subItems": [
{
"type": "subitem",
"name": "PJSON",
"keywords": [
"POINTER"
],
"comments": "The JSON pointer"
}
]
},
{
"type": "procedure",
"name": "GEOTAB_GET",
"keywords": [
"POINTER",
"EXTPROC"
],
"comments": "Makes a call to the Geotab Get() API.",
"subItems": [
{
"type": "subitem",
"name": "PSESSION",
"keywords": [
"LIKE(GEOTAB_TOKEN)"
],
"comments": "The token from Geotab_Auth"
},
{
"type": "subitem",
"name": "PTYPE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The Entity type (from Geotab)"
},
{
"type": "subitem",
"name": "PLIMIT",
"keywords": [
"INT(5)",
"CONST",
"OPTIONS(*NOPASS)"
],
"comments": "The max amount of elements returned"
},
{
"type": "subitem",
"name": "PSEARCH",
"keywords": [
"POINTER",
"OPTIONS(*NOPASS)"
],
"comments": "The search object, if any. Object can be created with Geotab_NewObject()."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_GETFEED",
"keywords": [
"POINTER",
"EXTPROC"
],
"comments": "Makes a call to the Geotab GetFeed() API",
"subItems": [
{
"type": "subitem",
"name": "PSESSION",
"keywords": [
"LIKE(GEOTAB_TOKEN)"
],
"comments": "The token from Geotab_Auth"
},
{
"type": "subitem",
"name": "PTYPE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The Geotab Entity"
},
{
"type": "subitem",
"name": "PLIMIT",
"keywords": [
"INT(5)",
"CONST",
"OPTIONS(*NOPASS)"
],
"comments": "The limit of items in the returned array"
},
{
"type": "subitem",
"name": "PFROMVERSION",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING:*NOPASS)"
],
"comments": "The from version to collect data in the next group. This API returns a toVersion, which can then be used in this From Version parameter."
},
{
"type": "subitem",
"name": "PSEARCH",
"keywords": [
"POINTER",
"OPTIONS(*NOPASS)"
],
"comments": "The search object, if any. Object can be created with Geotab_NewObject()."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_GETROADMAXSPEEDS",
"keywords": [
"POINTER",
"EXTPROC"
],
"comments": "Makes a call to the Geotab GetRoadMaxSpeeds() API",
"subItems": [
{
"type": "subitem",
"name": "PSESSION",
"keywords": [
"LIKE(GEOTAB_TOKEN)"
],
"comments": "The token from Geotab_Auth"
},
{
"type": "subitem",
"name": "PDEVICEID",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING:*NOPASS)"
],
"comments": "Optionally search for speeds for a specific device ID."
},
{
"type": "subitem",
"name": "PFROMDATE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING:*NOPASS)"
],
"comments": "An ISO format date. (<code>%Char(datevar:*ISO)</code>)"
},
{
"type": "subitem",
"name": "PTODATE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING:*NOPASS)"
],
"comments": "An ISO format date. (<code>%Char(datevar:*ISO)</code>)"
}
]
},
{
"type": "procedure",
"name": "GEOTAB_GETADDRESSES",
"keywords": [
"POINTER",
"EXTPROC"
],
"comments": "Makes a call to the Geotab GetAddresses() API",
"subItems": [
{
"type": "subitem",
"name": "PSESSION",
"keywords": [
"LIKE(GEOTAB_TOKEN)"
],
"comments": "The token from Geotab_Auth"
},
{
"type": "subitem",
"name": "PCOORDINATES",
"keywords": [
"POINTER",
"VALUE"
],
"comments": "An array of coordinateds. Please see the GetAddresses API."
},
{
"type": "subitem",
"name": "PHOSADDRESSES",
"keywords": [
"IND",
"CONST",
"OPTIONS(*NOPASS)"
],
"comments": "Optional indicator."
},
{
"type": "subitem",
"name": "PMOVINGADDRESSES",
"keywords": [
"IND",
"CONST",
"OPTIONS(*NOPASS)"
],
"comments": "Optional indicator."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_ADD",
"keywords": [
"EXTPROC"
],
"comments": "Makes a call to the Geotab Add() API",
"subItems": [
{
"type": "subitem",
"name": "PSESSION",
"keywords": [
"LIKE(GEOTAB_TOKEN)"
],
"comments": "The token from Geotab_Auth"
},
{
"type": "subitem",
"name": "PENTITYTYPE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The Geotab Entity"
},
{
"type": "subitem",
"name": "PENTITYPROPERTIES",
"keywords": [
"POINTER"
],
"comments": "The properties for the Entity to be added."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_UPDATE",
"keywords": [
"EXTPROC"
],
"comments": "Makes a call to the Geotab Update() API",
"subItems": [
{
"type": "subitem",
"name": "PSESSION",
"keywords": [
"LIKE(GEOTAB_TOKEN)"
],
"comments": "The token from Geotab_Auth"
},
{
"type": "subitem",
"name": "PENTITYTYPE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The Geotab Entity"
},
{
"type": "subitem",
"name": "PENTITYPROPERTIES",
"keywords": [
"POINTER"
],
"comments": "The properties you want to update on selected Entity. Must provide an 'id' property for the update method."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_NEWOBJECT",
"keywords": [
"POINTER",
"EXTPROC"
],
"comments": "Returns a new, empty, JSON object.",
"subItems": []
},
{
"type": "procedure",
"name": "GEOTAB_NEWARRAY",
"keywords": [
"POINTER",
"EXTPROC"
],
"comments": "Returns a new, empty, JSON array.",
"subItems": []
},
{
"type": "procedure",
"name": "GEOTAB_SETARRAY",
"keywords": [
"EXTPROC"
],
"comments": "Used to set a property in an object to an existing array.",
"subItems": [
{
"type": "subitem",
"name": "POBJECT",
"keywords": [
"POINTER"
],
"comments": "Existing JSON object."
},
{
"type": "subitem",
"name": "PPROPERTY",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The name of the property for the array."
},
{
"type": "subitem",
"name": "PARRAY",
"keywords": [
"POINTER"
],
"comments": "The JSOJ array for the property."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_SETOBJECT",
"keywords": [
"EXTPROC"
],
"comments": "Used to set a property in an object to an existing object.",
"subItems": [
{
"type": "subitem",
"name": "POBJECT",
"keywords": [
"POINTER"
],
"comments": "Existing JSON object."
},
{
"type": "subitem",
"name": "PPROPERTY",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The name of the property for the array."
},
{
"type": "subitem",
"name": "PNEWOBJECT",
"keywords": [
"POINTER"
],
"comments": "The JSON object for the property."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_ARRAYPUSH",
"keywords": [
"EXTPROC"
],
"comments": "Used to push a JSON object/array to an array.",
"subItems": [
{
"type": "subitem",
"name": "PARRAY",
"keywords": [
"POINTER"
],
"comments": "Existing JSON array."
},
{
"type": "subitem",
"name": "PVALUE",
"keywords": [
"POINTER"
],
"comments": "Object/array to push."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_ARRAYPUSHSTRING",
"keywords": [
"EXTPROC"
],
"comments": "Used to push a string to an array",
"subItems": [
{
"type": "subitem",
"name": "PARRAY",
"keywords": [
"POINTER"
],
"comments": "Existing JSON array."
},
{
"type": "subitem",
"name": "PVALUE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "String to push. Does not automatically trim."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_SETSTR",
"keywords": [
"EXTPROC"
],
"comments": "Used to set a property in an object to a string.",
"subItems": [
{
"type": "subitem",
"name": "POBJECT",
"keywords": [
"POINTER"
],
"comments": "Existing JSON object."
},
{
"type": "subitem",
"name": "PPROPERTY",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The name of the property for the value."
},
{
"type": "subitem",
"name": "PVALUE",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The number value."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_SETNUM",
"keywords": [
"EXTPROC"
],
"comments": "Used to set a property in an object to a number.",
"subItems": [
{
"type": "subitem",
"name": "POBJECT",
"keywords": [
"POINTER"
],
"comments": "Existing JSON object."
},
{
"type": "subitem",
"name": "PPROPERTY",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The name of the property for the value."
},
{
"type": "subitem",
"name": "PVALUE",
"keywords": [
"PACKED(30:15)",
"CONST"
],
"comments": "The number value."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_SETBOOL",
"keywords": [
"EXTPROC"
],
"comments": "Used to set a property in an object to a boolean.",
"subItems": [
{
"type": "subitem",
"name": "POBJECT",
"keywords": [
"POINTER"
],
"comments": "Existing JSON object."
},
{
"type": "subitem",
"name": "PPROPERTY",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The name of the property for the value."
},
{
"type": "subitem",
"name": "PVALUE",
"keywords": [
"IND",
"CONST"
],
"comments": "The indicator value."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_GETCOUNT",
"keywords": [
"INT(5)",
"EXTPROC"
],
"comments": "Can be used after an API call to determine how many elements were returned in the result.",
"subItems": [
{
"type": "subitem",
"name": "PGETRESULT",
"keywords": [
"POINTER"
],
"comments": "Resulting pointer."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_ELEMENTAT",
"keywords": [
"POINTER",
"EXTPROC"
],
"comments": "Used to get the value at a certain index in an array. Will return null if not found.",
"subItems": [
{
"type": "subitem",
"name": "PARRAY",
"keywords": [
"POINTER"
],
"comments": "Existing array."
},
{
"type": "subitem",
"name": "PINDEX",
"keywords": [
"INT(5)",
"CONST"
],
"comments": "Index."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_STRINGAT",
"keywords": [
"VARCHAR(128)",
"EXTPROC"
],
"comments": "Used to get a string value of a property in an object.",
"subItems": [
{
"type": "subitem",
"name": "POBJECT",
"keywords": [
"POINTER"
],
"comments": "Existing JSON object."
},
{
"type": "subitem",
"name": "PPROPERTY",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The name of the property in the object."
}
]
},
{
"type": "procedure",
"name": "GEOTAB_NUMBERAT",
"keywords": [
"PACKED(30:15)",
"EXTPROC"
],
"comments": "Used to get a number value of a property in an object.",
"subItems": [
{
"type": "subitem",
"name": "POBJECT",
"keywords": [
"POINTER"
],
"comments": "Existing JSON object."
},
{
"type": "subitem",
"name": "PPROPERTY",
"keywords": [
"POINTER",
"VALUE",
"OPTIONS(*STRING)"
],
"comments": "The name of the property in the object."
}
]
}
],
"structs": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment