51Degrees Device Detection for Node.js

DeviceDetectionDataFile Class Reference

Detailed Description

Instance of DataFile class for the Device Detection Engine Extends datafile by providing a formatter for the DataFileUpdateService update url which contains the product, type and licensekeys.

These paramaters are passed in to the datafile constructor's updateURLParams parameter

Inheritance diagram for DeviceDetectionDataFile:

[legend]

Collaboration diagram for DeviceDetectionDataFile:

[legend]

Public Member Functions

 constructor ({ useUrlFormatter=true,...rest })
 Constructor for Device Detection DataFile.
 urlFormatter ()
 Uses the product, type and licensekey parameters the datafile was constructed with to generate a querystring used in the datafile update service.

Public Member Functions inherited from DataFile

 constructor ({ flowElement, identifier, updateURLParams, tempDataDirectory=os.tmpdir(), createTempDataCopy=true, data, path, autoUpdate=true, fileSystemWatcher=true, pollingInterval=30, updateTimeMaximumRandomisation=10, verifyMD5=true, decompress=true, download=true, getDatePublished, getNextUpdate, verifyIfModifiedSince=true, updateOnStart=false, isRegistered=false, refresh, onUpdateComplete })
 refresh (identifier)
get updateUrl ()
 urlFormatter ()

Member Function Documentation

◆ constructor()

DeviceDetectionDataFile::constructor ( { useUrlFormatter=true,...rest })
inline

Constructor for Device Detection DataFile.

Parameters
{object}options options for the datafile
{string}options.useUrlFormatter whether to append default URL params for Data File download

◆ urlFormatter()

DeviceDetectionDataFile::urlFormatter ( )
inline

Uses the product, type and licensekey parameters the datafile was constructed with to generate a querystring used in the datafile update service.

Returns
{string} url