I am having trouble getting the GeoTab javascript API to function. I am loading the javascript found at...
https://cdn.jsdelivr.net/npm/mg-api-js
The code I am trying to run is simply...
$(document).ready(function() {
var api = GeotabApi({
credentials: {
database: 'mydb',
userName: 'myusername',
password: 'mypassword'
},
path: 'my.geotab.com'
});
});
The error I get is...
"jQuery.Deferred exception: Cannot call a class as a function", "TypeError: Cannot call a class as a function
at _classCallCheck (https://cdn.jsdelivr.net/npm/mg-api-js:598:99)
at GeotabApi (https://cdn.jsdelivr.net/npm/mg-api-js:627:5)
at HTMLDocument.<anonymous> (https://fiddle.jshell.net/_display/?editor_console=true:113:13)
at mightThrow (https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js:3557:29)
at process (https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js:3625:12)", undefined
"Script error."I have a sample that shows the error at this location...
https://jsfiddle.net/jeljeljel/6o9wdehs/3/
What am I doing wrong here?