async function lookupDiagnostic(diagnosticId) {
    return new Promise(function (resolve, reject) {
        geotab.call('Get', {
            typeName: 'Diagnostic',
            search: {
                id: diagnosticId
            }
        }, function (error, result) {
            if (error) {
                console.error('Got error:', error);
                reject(Error(error));
            } else {
                if (result.length > 0) {
                    resolve(result[0]);
                } else {
                    reject(Error('Diagnostic not found!'));
                }
            }
        });
    });
}
/**
 * Look up the Geotab Diagnostic by its ID.
 *
 * @param {string} diagnosticId the Geotab Diagnostic ID
 */
Look up the Geotab Diagnostic by its ID.
@param {string} diagnosticId the Geotab Diagnostic ID
Look up the Geotab Diagnostic by its ID . @param { string } diagnosticId the Geotab Diagnostic ID
async function lookupDiagnostic(diagnosticId) {
    return new Promise(function (resolve, reject) {
        geotab.call('Get', {
            typeName: 'Diagnostic',
            search: {
                id: diagnosticId
            }
        }, function (error, result) {
            if (error) {
                console.error('Got error:', error);
                reject(Error(error));
            } else {
                if (result.length > 0) {
                    resolve(result[0]);
                } else {
                    reject(Error('Diagnostic not found!'));
                }
            }
        });
    });
}
async function lookupDiagnostic ( diagnosticId ) { return new Promise ( function ( resolve , reject ) { geotab . call ( 'Get' , { typeName : 'Diagnostic' , search : { id : diagnosticId } } , function ( error , result ) { if ( error ) { console . error ( 'Got error:' , error ) ; reject ( Error ( error ) ) ; } else { if ( result . length > 0 ) { resolve ( result [ 0 ] ) ; } else { reject ( Error ( 'Diagnostic not found!' ) ) ; } } } ) ; } ) ; }
Look up the Geotab Diagnostic by its ID.
Look up the Geotab Diagnostic by its ID .