- LaMetric
A class that provides utility functions for the LaMetric json-format.
- Timer
A class used to fetch data from InventivetalentDevs api.
- JsonConfiguration
Basic json-configuration.
- TimeUtility
A class that provides comparison methods for the estimated time.
- handleLegacyRequest(req, res)
Handles incoming requests.
- handleRequest(req, res)
Handles requests with timer-names.
- handleSummary(req, res) ⇒
Promise.<{frames: {test: string, icon: string}}>
Handles requests to the getEstimations path.
- logRequest(req, res, next)
Logs an incoming request.
- stringifyResults(req, result, timerName) ⇒
Object
"Stingifies" the results of a fetched result.
- applyLeadingZeros(num, req) ⇒
string
|number
Applies the leadingZeros query-parameter.
A class that provides utility functions for the LaMetric json-format.
Generates a response for LaMetric devices.
Kind: static method of LaMetric
Returns: object
Param | Type | Description |
---|---|---|
message | string |
The message. |
icon | string |
The code of the icon that should be used. |
A class used to fetch data from InventivetalentDevs api.
Kind: global class
- Timer
- .fetchData(timerKey) ⇒
Promise.<object>
- .magmaBoss() ⇒
Promise.<object>
- .newYear() ⇒
Promise.<object>
- .darkAuction() ⇒
Promise.<object>
- .interest() ⇒
Promise.<object>
- .spooky() ⇒
Promise.<object>
- .winter() ⇒
Promise.<Object>
- .zoo() ⇒
Promise.<Object>
- .fetchData(timerKey) ⇒
Fetches the estimated spawn time from the Magma-Boss-Timer api.
Kind: static method of Timer
Param | Type | Description |
---|---|---|
timerKey | string |
The key of the the timers requestUrl item. |
Get the estimation for the magma-boss.
Kind: static method of Timer
Get the estimation for the next new-year event.
Kind: static method of Timer
Get the estimation for the next dark-auction.
Kind: static method of Timer
Get the estimation for the interest timer.
Kind: static method of Timer
Get the estimation for the spooky festival timer.
Kind: static method of Timer
Get the estimation for the winter-event timer.
Kind: static method of Timer
Get the estimation for the travelling zoo timer.
Kind: static method of Timer
Basic json-configuration.
Kind: global class
- JsonConfiguration
- new JsonConfiguration(file)
- .set(key, val)
- .get(key) ⇒
string
|number
|object
- .isSet(key) ⇒
boolean
- .default(key, val)
- .defaults(obj)
- .save(file)
Construction of JsonConfiguration.
Param | Type | Description |
---|---|---|
file | string |
The configs filepath. |
Set a configuration value.
Kind: instance method of JsonConfiguration
Param | Type |
---|---|
key | string |
val | string | number | object |
Get a configuration value.
Kind: instance method of JsonConfiguration
Param | Type |
---|---|
key | string |
True if the given key is set.
Kind: instance method of JsonConfiguration
Param | Type |
---|---|
key | string |
Set a keys default value.
Kind: instance method of JsonConfiguration
Param | Type |
---|---|
key | string |
val | string | number | object |
Set multiple defaults based on the given object.
Kind: instance method of JsonConfiguration
Param | Type |
---|---|
obj | object |
Saves the current configuration.
Kind: instance method of JsonConfiguration
Param | Type | Description |
---|---|---|
file | string |
Optional. The file path the configuration should be saved to. |
A class that provides comparison methods for the estimated time.
Returns an object which contains the difference between present and estimation.
Kind: static method of TimeUtility
Returns: object
Param | Type | Description |
---|---|---|
estimation | int |
The unix timestamp of the estimation. |
Handles incoming requests.
Kind: global function
Param | Type |
---|---|
req | Request |
res | Response |
Handles requests with timer-names.
Kind: global function
Param | Type |
---|---|
req | Request |
res | Response |
Handles requests to the getEstimations path.
Kind: global function
Param | Type |
---|---|
req | Request |
res | Response |
Logs an incoming request.
Kind: global function
Param | Type |
---|---|
req | Request |
res | Response |
next | function |
"Stingifies" the results of a fetched result.
Kind: global function
Param | Type |
---|---|
req | Request |
result | object |
timerName | string |
Applies the leadingZeros query-parameter.
Kind: global function
Param | Type |
---|---|
num | number |
req | Request |