diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/classes.list.html b/classes.list.html new file mode 100644 index 00000000..2c39fa61 --- /dev/null +++ b/classes.list.html @@ -0,0 +1,3123 @@ + + + + + + + Worldstate Emitter Classes + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Classes

+
+ +
+ +

+ +

+ + +
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+
+

<constant> arbitration

+ + +
+
+ +
+ Parse an arbitration for its key +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

<constant> between

+ + +
+
+ +
+ Validate that b is between a and c +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

data

+ + +
+
+ +
+ Get the latest worldstate data from this cache +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

data

+ + +
+
+ +
+ Set the current data, aslso parses and emits data +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

<constant> groupBy

+ + +
+
+ +
+ Group an array by a field value +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

<constant> lastUpdated :Object

+ + +
+
+ +
+ Map of last updated dates/times +
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

twitter

+ + +
+
+ +
+ Set the current twitter data for the worldstate +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

emit(id, packet)

+ + +
+
+ + +
+ Emit an event with given id +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +string + + + + + Id of the event to emit
packet + + +Object + + + + + Data packet to emit
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

fromNow(d [, now])

+ + +
+
+ + +
+ Returns the number of milliseconds between now and a given date +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
d + + +string + + + + + + + + + + + The date from which the current time will be subtracted
now + + +function + + + + + + + <optional>
+ + + + + +
A function that returns the current UNIX time in milliseconds
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +number + + + +
+
+ + + + + +
+ + + +
+
+

get( [language])

+ + +
+
+ + +
+ get a specific worldstate version +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
language + + +string + + + + + + + <optional>
+ + + + + +
+ + 'en' + + Locale of the worldsttate
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + +
Throws:
+ + + +
+
+
+ when the platform or locale aren't tracked and aren't updated +
+
+
+
+
+ Type +
+
+ +Error + + + +
+
+
+
+ + + + + +
Returns:
+ + +
+ Worldstate corresponding to provided data +
+ + + +
+
+ Type +
+
+ +Object + + + +
+
+ + + + + +
+ + + +
+
+

<async> getData()

+ + +
+
+ + +
+ Get the current data or a promise with the current data +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+ either the current data + if it's not updating, or the promise returning the new data +
+ + + +
+
+ Type +
+
+ +Promise.<Object> +| + +Object + + + +
+
+ + + + + +
+ + + +
+
+

<async> getParseableData()

+ + +
+
+ + +
+ Get data able to be parsed from twitter. +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+ Tweets +
+ + + +
+
+ Type +
+
+ +Promise.<Array.<Object>> + + + +
+
+ + + + + +
+ + + +
+
+

initCycleStart(deps)

+ + +
+
+ + +
+ Set up current cycle start if it's not been initiated +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
deps + + +Deps + + + + + dependencies for processing
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

onError(error)

+ + +
+
+ + +
+ Handle errors that arise while fetching data from twitter +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +Error + + + + + twitter error
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

parseEvents(worldstate, platform [, language])

+ + +
+
+ + +
+ Parse new worldstate events +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
worldstate + + +Object + + + + + + + + + + + + + worldstate to find packets from
platform + + +string + + + + + + + + + + + + + platform the worldstate corresponds to
language + + +string + + + + + + + <optional>
+ + + + + +
+ + 'en' + + language of the worldstate (defaults to 'en')
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

<async> setUpRawEmitters()

+ + +
+
+ + +
+ Set up emitting raw worldstate data +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

setupParsedEvents()

+ + +
+
+ + +
+ Set up listeners for the parsed worldstate updates +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

<async> update()

+ + +
+
+ + +
+ Force the cache to update +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+ the currently updating promise. +
+ + + +
+
+ Type +
+
+ +Promise + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

CycleLike

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
state + + +string + + + + +
key + + +string + + + + +
activation + + +Date + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

Deps

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + + event key being parsed
platform + + +string + + + + + platform the event is on
language + + +string + + + + + language the event is in
cycleStart + + +Date + + + + + start of the current cycle
data + + +Object +| + +Array + + + + + data to parse
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

ExternalMission

+ + +
+
+ +
+ External mission data retrieved from https://10o.io/kuvalog.json +
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
activation + + +Date + + + + + start time
expiry + + +Date + + + + + end timer
node + + +string + + + + + formatted node name with planet
enemy + + +string + + + + + Enemy on tile
type + + +string + + + + + Mission type of node
archwing + + +boolean + + + + + whether or not the tile requires archwing
sharkwing + + +boolean + + + + + whether or not the tile requires + sumbersible archwing
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/glyphicons-halflings-regular.eot b/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 00000000..b93a4953 Binary files /dev/null and b/fonts/glyphicons-halflings-regular.eot differ diff --git a/fonts/glyphicons-halflings-regular.svg b/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 00000000..94fb5490 --- /dev/null +++ b/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/glyphicons-halflings-regular.ttf b/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 00000000..1413fc60 Binary files /dev/null and b/fonts/glyphicons-halflings-regular.ttf differ diff --git a/fonts/glyphicons-halflings-regular.woff b/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 00000000..9e612858 Binary files /dev/null and b/fonts/glyphicons-halflings-regular.woff differ diff --git a/fonts/glyphicons-halflings-regular.woff2 b/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 00000000..64539b54 Binary files /dev/null and b/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/global.html b/global.html new file mode 100644 index 00000000..4bb82c84 --- /dev/null +++ b/global.html @@ -0,0 +1,3123 @@ + + + + + + + Worldstate Emitter Global + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Global

+
+ +
+ +

+ +

+ + +
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+
+

<constant> arbitration

+ + +
+
+ +
+ Parse an arbitration for its key +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

<constant> between

+ + +
+
+ +
+ Validate that b is between a and c +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

data

+ + +
+
+ +
+ Get the latest worldstate data from this cache +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

data

+ + +
+
+ +
+ Set the current data, aslso parses and emits data +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

<constant> groupBy

+ + +
+
+ +
+ Group an array by a field value +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

<constant> lastUpdated :Object

+ + +
+
+ +
+ Map of last updated dates/times +
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

twitter

+ + +
+
+ +
+ Set the current twitter data for the worldstate +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

emit(id, packet)

+ + +
+
+ + +
+ Emit an event with given id +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +string + + + + + Id of the event to emit
packet + + +Object + + + + + Data packet to emit
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

fromNow(d [, now])

+ + +
+
+ + +
+ Returns the number of milliseconds between now and a given date +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
d + + +string + + + + + + + + + + + The date from which the current time will be subtracted
now + + +function + + + + + + + <optional>
+ + + + + +
A function that returns the current UNIX time in milliseconds
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +number + + + +
+
+ + + + + +
+ + + +
+
+

get( [language])

+ + +
+
+ + +
+ get a specific worldstate version +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
language + + +string + + + + + + + <optional>
+ + + + + +
+ + 'en' + + Locale of the worldsttate
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + +
Throws:
+ + + +
+
+
+ when the platform or locale aren't tracked and aren't updated +
+
+
+
+
+ Type +
+
+ +Error + + + +
+
+
+
+ + + + + +
Returns:
+ + +
+ Worldstate corresponding to provided data +
+ + + +
+
+ Type +
+
+ +Object + + + +
+
+ + + + + +
+ + + +
+
+

<async> getData()

+ + +
+
+ + +
+ Get the current data or a promise with the current data +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+ either the current data + if it's not updating, or the promise returning the new data +
+ + + +
+
+ Type +
+
+ +Promise.<Object> +| + +Object + + + +
+
+ + + + + +
+ + + +
+
+

<async> getParseableData()

+ + +
+
+ + +
+ Get data able to be parsed from twitter. +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+ Tweets +
+ + + +
+
+ Type +
+
+ +Promise.<Array.<Object>> + + + +
+
+ + + + + +
+ + + +
+
+

initCycleStart(deps)

+ + +
+
+ + +
+ Set up current cycle start if it's not been initiated +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
deps + + +Deps + + + + + dependencies for processing
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

onError(error)

+ + +
+
+ + +
+ Handle errors that arise while fetching data from twitter +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
error + + +Error + + + + + twitter error
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

parseEvents(worldstate, platform [, language])

+ + +
+
+ + +
+ Parse new worldstate events +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
worldstate + + +Object + + + + + + + + + + + + + worldstate to find packets from
platform + + +string + + + + + + + + + + + + + platform the worldstate corresponds to
language + + +string + + + + + + + <optional>
+ + + + + +
+ + 'en' + + language of the worldstate (defaults to 'en')
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

<async> setUpRawEmitters()

+ + +
+
+ + +
+ Set up emitting raw worldstate data +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

setupParsedEvents()

+ + +
+
+ + +
+ Set up listeners for the parsed worldstate updates +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

<async> update()

+ + +
+
+ + +
+ Force the cache to update +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+ the currently updating promise. +
+ + + +
+
+ Type +
+
+ +Promise + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

CycleLike

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
state + + +string + + + + +
key + + +string + + + + +
activation + + +Date + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

Deps

+ + +
+
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +string + + + + + event key being parsed
platform + + +string + + + + + platform the event is on
language + + +string + + + + + language the event is in
cycleStart + + +Date + + + + + start of the current cycle
data + + +Object +| + +Array + + + + + data to parse
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ + + +
+
+

ExternalMission

+ + +
+
+ +
+ External mission data retrieved from https://10o.io/kuvalog.json +
+ + + +
Type:
+
    +
  • + +Object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
activation + + +Date + + + + + start time
expiry + + +Date + + + + + end timer
node + + +string + + + + + formatted node name with planet
enemy + + +string + + + + + Enemy on tile
type + + +string + + + + + Mission type of node
archwing + + +boolean + + + + + whether or not the tile requires archwing
sharkwing + + +boolean + + + + + whether or not the tile requires + sumbersible archwing
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/handlers_RSS.js.html b/handlers_RSS.js.html new file mode 100644 index 00000000..942a3058 --- /dev/null +++ b/handlers_RSS.js.html @@ -0,0 +1,317 @@ + + + + + + + Worldstate Emitter Source: handlers/RSS.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/RSS.js

+ +
+
+
import RssFeedEmitter from 'rss-feed-emitter';
+
+import feeds from '../resources/rssFeeds.json' assert { type: 'json' };
+import { logger } from '../utilities/index.js';
+
+/**
+ * RSS Emitter, leverages [rss-feed-emitter](https://npmjs.org/package/rss-feed-emitter)
+ */
+export default class RSS {
+  /**
+   * Set up emitting events for warframe forum entries
+   * @param {EventEmitter} eventEmitter Emitter to send events from
+   */
+  constructor(eventEmitter) {
+    this.logger = logger;
+    this.emitter = eventEmitter;
+    this.feeder = new RssFeedEmitter({
+      userAgent: 'WFCD Feed Notifier',
+      skipFirstLoad: true,
+    });
+
+    feeds.forEach((feed) => {
+      this.feeder.add({ url: feed.url, timeout: 30000 });
+    });
+    this.logger.debug('RSS Feed active');
+
+    this.start = Date.now();
+    this.feeder.on('error', this.logger.error.bind(this.logger));
+    this.feeder.on('new-item', this.handleNew.bind(this));
+  }
+
+  handleNew(item) {
+    try {
+      if (Object.keys(item.image).length) {
+        this.logger.debug(`Image: ${JSON.stringify(item.image)}`);
+      }
+      if (new Date(item.pubDate).getTime() <= this.start) return;
+
+      const feed = feeds.filter((feedEntry) => feedEntry.url === item.meta.link)[0];
+      let firstImg = ((item.description || '').match(/<img.*src="(.*)".*>/i) || [])[1];
+      if (!firstImg) {
+        firstImg = feed.defaultAttach;
+      } else if (firstImg.startsWith('//')) {
+        firstImg = firstImg.replace('//', 'https://');
+      }
+
+      const rssSummary = {
+        body: (item.description || '\u200B').replace(/<(?:.|\n)*?>/gm, '').replace(/\n\n+\s*/gm, '\n\n'),
+        url: item.link,
+        timestamp: item.pubDate,
+        description: item.meta.description,
+        author: feed.author || {
+          name: 'Warframe Forums',
+          url: item['rss:link']['#'],
+          icon_url: 'https://i.imgur.com/hE2jdpv.png',
+        },
+        title: item.title,
+        image: firstImg,
+        id: feed.key,
+      };
+      this.emitter.emit('rss', rssSummary);
+    } catch (error) {
+      this.logger.error(error);
+    }
+  }
+}
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_Twitter.js.html b/handlers_Twitter.js.html new file mode 100644 index 00000000..ed22e0c2 --- /dev/null +++ b/handlers_Twitter.js.html @@ -0,0 +1,420 @@ + + + + + + + Worldstate Emitter Source: handlers/Twitter.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/Twitter.js

+ +
+
+
import Twitter from 'twitter';
+
+import toWatch from '../resources/tweeters.json' assert { type: 'json' };
+import { logger } from '../utilities/index.js';
+import { twiClientInfo, TWITTER_TIMEOUT } from '../utilities/env.js';
+
+const determineTweetType = (tweet) => {
+  if (tweet.in_reply_to_status_id) {
+    return 'reply';
+  }
+  if (tweet.quoted_status_id) {
+    return 'quote';
+  }
+  if (tweet.retweeted_status) {
+    return 'retweet';
+  }
+  return 'tweet';
+};
+
+const parseAuthor = (tweet) => ({
+  name: tweet.user.name,
+  handle: tweet.user.screen_name,
+  url: `https://twitter.com/${tweet.user.screen_name}`,
+  avatar: `${tweet.user.profile_image_url.replace('_normal.jpg', '.jpg')}`,
+});
+
+const parseQuoted = (tweet, type) =>
+  tweet[type]
+    ? {
+        text: tweet[type].full_text,
+        author: {
+          name: tweet[type].user.name,
+          handle: tweet[type].user.screen_name,
+        },
+      }
+    : undefined;
+
+const parseTweet = (tweets, watchable) => {
+  const [tweet] = tweets;
+  const type = determineTweetType(tweet);
+  return {
+    id: `twitter.${watchable.plain}.${type}`,
+    uniqueId: String(tweets[0].id_str),
+    text: tweet.full_text,
+    url: `https://twitter.com/${tweet.user.screen_name}/status/${tweet.id_str}`,
+    mediaUrl: tweet.entities.media ? tweet.entities.media[0].media_url : undefined,
+    isReply: typeof tweet.in_reply_to_status_id !== 'undefined',
+    author: parseAuthor(tweet),
+    quote: parseQuoted(tweet, 'quoted_status'),
+    retweet: parseQuoted(tweet, 'retweeted_status'),
+    createdAt: new Date(tweet.created_at),
+  };
+};
+
+/**
+ * Twitter event handler
+ */
+export default class TwitterCache {
+  /**
+   * Create a new Twitter self-updating cache
+   * @param {EventEmitter} eventEmitter emitter to push new tweets to
+   */
+  constructor(eventEmitter) {
+    this.emitter = eventEmitter;
+    this.timeout = TWITTER_TIMEOUT;
+    this.clientInfoValid = twiClientInfo.consumer_key && twiClientInfo.consumer_secret && twiClientInfo.bearer_token;
+    this.initClient(twiClientInfo);
+  }
+
+  initClient(clientInfo) {
+    try {
+      if (this.clientInfoValid) {
+        this.client = new Twitter(clientInfo);
+
+        // don't attempt anything else if authentication fails
+        this.toWatch = toWatch;
+        this.currentData = undefined;
+        this.lastUpdated = Date.now() - 60000;
+        this.updateInterval = setInterval(() => this.update(), this.timeout);
+        this.update();
+      } else {
+        logger.warn(`Twitter client not initialized... invalid token: ${clientInfo.bearer_token}`);
+      }
+    } catch (err) {
+      this.client = undefined;
+      this.clientInfoValid = false;
+      logger.error(err);
+    }
+  }
+
+  /**
+   * Force the cache to update
+   * @returns {Promise} the currently updating promise.
+   */
+  async update() {
+    if (!this.clientInfoValid) return undefined;
+
+    if (!this.toWatch) {
+      logger.verbose('Not processing twitter, no data to watch.');
+      return undefined;
+    }
+
+    if (!this.client) {
+      logger.verbose('Not processing twitter, no client to connect.');
+      return undefined;
+    }
+
+    this.updating = this.getParseableData();
+
+    return this.updating;
+  }
+
+  /**
+   * Get data able to be parsed from twitter.
+   * @returns {Promise.<Array.<Object>>} Tweets
+   */
+  async getParseableData() {
+    logger.silly('Starting Twitter update...');
+    const parsedData = [];
+    try {
+      await Promise.all(
+        this.toWatch.map(async (watchable) => {
+          const tweets = await this.client.get('statuses/user_timeline', {
+            screen_name: watchable.acc_name,
+            tweet_mode: 'extended',
+            count: 1,
+          });
+          const tweet = parseTweet(tweets, watchable);
+          parsedData.push(tweet);
+
+          if (tweet.createdAt.getTime() > this.lastUpdated) {
+            this.emitter.emit('tweet', tweet);
+          }
+        })
+      );
+    } catch (error) {
+      this.onError(error);
+    }
+    this.lastUpdated = Date.now();
+    return parsedData;
+  }
+
+  /**
+   * Handle errors that arise while fetching data from twitter
+   * @param  {Error} error twitter error
+   */
+  onError(error) {
+    if (error[0] && error[0].code === 32) {
+      this.clientInfoValid = false;
+      logger.info('wiping twitter client data, could not authenticate...');
+    } else {
+      logger.debug(JSON.stringify(error));
+    }
+  }
+
+  /**
+   * Get the current data or a promise with the current data
+   * @returns {Promise.<Object> | Object} either the current data
+   *  if it's not updating, or the promise returning the new data
+   */
+  async getData() {
+    if (!this.clientInfoValid) return undefined;
+
+    if (this.updating) {
+      return this.updating;
+    }
+    return this.currentData;
+  }
+}
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_Worldstate.js.html b/handlers_Worldstate.js.html new file mode 100644 index 00000000..231d31fb --- /dev/null +++ b/handlers_Worldstate.js.html @@ -0,0 +1,406 @@ + + + + + + + Worldstate Emitter Source: handlers/Worldstate.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/Worldstate.js

+ +
+
+
import wsData from 'warframe-worldstate-data';
+
+import WSCache from '../utilities/WSCache.js';
+import { logger, lastUpdated } from '../utilities/index.js';
+import Cache from '../utilities/Cache.js';
+
+import parseNew from './events/parse.js';
+
+const { locales } = wsData;
+
+const debugEvents = ['arbitration', 'kuva', 'nightwave'];
+const smCron = `0 */10 * * * *`;
+
+/**
+ * Handler for worldstate data
+ */
+export default class Worldstate {
+  #emitter;
+  #locale;
+  #worldStates = {};
+  #wsRawCache;
+  #kuvaCache;
+  #sentientCache;
+
+  /**
+   * Set up listening for specific platform and locale if provided.
+   * @param {EventEmitter} eventEmitter Emitter to push new worldstate events to
+   * @param {string} locale       Locale (actually just language) to watch
+   */
+  constructor(eventEmitter, locale) {
+    this.#emitter = eventEmitter;
+    this.#locale = locale;
+    logger.debug('starting up worldstate listener...');
+    if (locale) {
+      logger.debug(`only listening for ${locale}...`);
+    }
+  }
+
+  async init() {
+    this.#wsRawCache = await Cache.make('https://content.warframe.com/dynamic/worldState.php', '*/10 * * * * *');
+    this.#kuvaCache = await Cache.make('https://10o.io/arbitrations.json', smCron);
+    this.#sentientCache = await Cache.make('https://semlar.com/anomaly.json', smCron);
+
+    await this.setUpRawEmitters();
+    this.setupParsedEvents();
+  }
+
+  /**
+   * Set up emitting raw worldstate data
+   */
+  async setUpRawEmitters() {
+    this.#worldStates = {};
+
+    // eslint-disable-next-line no-restricted-syntax
+    for await (const locale of locales) {
+      if (!this.#locale || this.#locale === locale) {
+        this.#worldStates[locale] = new WSCache({
+          language: locale,
+          kuvaCache: this.#kuvaCache,
+          sentientCache: this.#sentientCache,
+          eventEmitter: this.#emitter,
+        });
+      }
+    }
+
+    /* listen for the raw cache updates so we can emit them from the super emitter */
+    this.#wsRawCache.on('update', (dataStr) => {
+      this.#emitter.emit('ws:update:raw', { platform: 'pc', data: dataStr });
+    });
+
+    /* when the raw emits happen, parse them and store them on parsed worldstate caches */
+    this.#emitter.on('ws:update:raw', ({ data }) => {
+      logger.debug('ws:update:raw - updating locales data');
+      locales.forEach((locale) => {
+        if (!this.#locale || this.#locale === locale) {
+          this.#worldStates[locale].data = data;
+        }
+      });
+    });
+  }
+
+  /**
+   * Set up listeners for the parsed worldstate updates
+   */
+  setupParsedEvents() {
+    this.#emitter.on('ws:update:parsed', ({ language, platform, data }) => {
+      const packet = { platform, worldstate: data, language };
+      this.parseEvents(packet);
+    });
+  }
+
+  /**
+   * Parse new worldstate events
+   * @param  {Object} worldstate     worldstate to find packets from
+   * @param  {string} platform       platform the worldstate corresponds to
+   * @param  {string} [language='en'] language of the worldstate (defaults to 'en')
+   */
+  parseEvents({ worldstate, platform, language = 'en' }) {
+    const cycleStart = Date.now();
+    const packets = [];
+    Object.keys(worldstate).forEach(async (key) => {
+      if (worldstate && worldstate[key]) {
+        const packet = parseNew({
+          data: worldstate[key],
+          key,
+          language,
+          platform,
+          cycleStart,
+        });
+
+        if (Array.isArray(packet)) {
+          if (packet.length) {
+            packets.push(...packet.filter((p) => p && p));
+          }
+        } else if (packet) {
+          packets.push(packet);
+        }
+      }
+    });
+
+    lastUpdated[platform][language] = Date.now();
+    packets
+      .filter((p) => p && p.id && packets)
+      .forEach((packet) => {
+        this.emit('ws:update:event', packet);
+      });
+  }
+
+  /**
+   * Emit an event with given id
+   * @param  {string} id     Id of the event to emit
+   * @param  {Object} packet Data packet to emit
+   */
+  emit(id, packet) {
+    if (debugEvents.includes(packet.key)) logger.warn(packet.key);
+
+    logger.debug(`ws:update:event - emitting ${packet.id}`);
+    delete packet.cycleStart;
+    this.#emitter.emit(id, packet);
+  }
+
+  /**
+   * get a specific worldstate version
+   * @param  {string} [language='en'] Locale of the worldsttate
+   * @returns {Object}                Worldstate corresponding to provided data
+   * @throws {Error} when the platform or locale aren't tracked and aren't updated
+   */
+  get(language = 'en') {
+    logger.debug(`getting worldstate ${language}...`);
+    if (this.#worldStates?.[language]) {
+      return this.#worldStates?.[language]?.data;
+    }
+    throw new Error(`Language (${language}) not tracked.\nEnsure that the parameters passed are correct`);
+  }
+}
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_events_arrayLike.js.html b/handlers_events_arrayLike.js.html new file mode 100644 index 00000000..b3aae1bb --- /dev/null +++ b/handlers_events_arrayLike.js.html @@ -0,0 +1,278 @@ + + + + + + + Worldstate Emitter Source: handlers/events/arrayLike.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/events/arrayLike.js

+ +
+
+
import { logger } from '../../utilities/index.js';
+
+import checkOverrides from './checkOverrides.js';
+import objectLike from './objectLike.js';
+
+/**
+ * arrayLike are all just arrays of objectLike
+ * @param  {Object} deps    dependencies for processing
+ * @param  {Object[]} packets  packets to emit
+ * @returns {Object|Object[]}  object(s) to emit from arrayLike processing
+ */
+export default (deps, packets) => {
+  try {
+    deps.data.forEach((arrayItem) => {
+      const k = checkOverrides(deps.key, arrayItem);
+      packets.push(
+        objectLike(arrayItem, {
+          ...deps,
+          id: k,
+        })
+      );
+    });
+    return packets;
+  } catch (err) {
+    logger.error(err);
+  }
+};
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_events_checkOverrides.js.html b/handlers_events_checkOverrides.js.html new file mode 100644 index 00000000..ffdaf725 --- /dev/null +++ b/handlers_events_checkOverrides.js.html @@ -0,0 +1,268 @@ + + + + + + + Worldstate Emitter Source: handlers/events/checkOverrides.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/events/checkOverrides.js

+ +
+
+
import * as eKeyOverrides from './eKeyOverrides.js';
+
+/**
+ * Find overrides for the provided key
+ * @param  {string} key  worldsate field to find overrides
+ * @param  {Object} data data corresponding to the key from provided worldstate
+ * @returns {string}      overrided key
+ */
+export default (key, data) => {
+  if (typeof eKeyOverrides[key] === 'string') {
+    return eKeyOverrides[key];
+  }
+  if (typeof eKeyOverrides[key] === 'function') {
+    return eKeyOverrides[key](data);
+  }
+  return key;
+};
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_events_cycleLike.js.html b/handlers_events_cycleLike.js.html new file mode 100644 index 00000000..19f5a02e --- /dev/null +++ b/handlers_events_cycleLike.js.html @@ -0,0 +1,289 @@ + + + + + + + Worldstate Emitter Source: handlers/events/cycleLike.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/events/cycleLike.js

+ +
+
+
import { between, lastUpdated, fromNow } from '../../utilities/index.js';
+
+/**
+ * @typedef {Object} CycleLike
+ * @property {string} state
+ * @property {string} key
+ * @property {Date} activation
+ */
+
+/**
+ * CylceData parser
+ * @param {CycleLike} cycleData data for parsing all cycles like this
+ * @param {Deps} deps dependencies for processing
+ * @returns {Object[]}
+ */
+export default (cycleData, deps) => {
+  const packet = {
+    ...deps,
+    data: cycleData,
+    id: `${deps.key.replace('Cycle', '')}.${cycleData.state}`,
+  };
+
+  const last = new Date(lastUpdated[deps.platform][deps.language]);
+  const activation = new Date(cycleData.activation);
+  const start = new Date(deps.cycleStart);
+
+  const packets = [];
+  if (between(last, activation, start)) {
+    packets.push(packet);
+  }
+
+  const timePacket = {
+    ...packet,
+    id: `${packet.id}.${Math.round(fromNow(deps.data.expiry) / 60000)}`,
+  };
+  packets.push(timePacket);
+  return packets;
+};
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_events_eKeyOverrides.js.html b/handlers_events_eKeyOverrides.js.html new file mode 100644 index 00000000..6b9128d7 --- /dev/null +++ b/handlers_events_eKeyOverrides.js.html @@ -0,0 +1,291 @@ + + + + + + + Worldstate Emitter Source: handlers/events/eKeyOverrides.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/events/eKeyOverrides.js

+ +
+
+
import { logger } from '../../utilities/index.js';
+
+/**
+ * External mission data retrieved from https://10o.io/kuvalog.json
+ * @typedef {Object} ExternalMission
+ * @property {Date} activation start time
+ * @property {Date} expiry end timer
+ * @property {string} node formatted node name with planet
+ * @property {string} enemy Enemy on tile
+ * @property {string} type Mission type of node
+ * @property {boolean} archwing whether or not the tile requires archwing
+ * @property {boolean} sharkwing whether or not the tile requires
+ *    sumbersible archwing
+ */
+
+export const fissures = (fissure) => `fissures.t${fissure.tierNum}.${(fissure.missionType || '').toLowerCase()}`;
+export const enemies = (acolyte) => ({
+  eventKey: `enemies${acolyte.isDiscovered ? '' : '.departed'}`,
+  activation: acolyte.lastDiscoveredAt,
+});
+
+/**
+ * Parse an arbitration for its key
+ * @param {ExternalMission} arbi arbitration data to parse
+ * @returns {string}
+ */
+export const arbitration = (arbi) => {
+  if (!arbi?.enemy) return '';
+
+  let k;
+  try {
+    k = `arbitration.${arbi.enemy.toLowerCase()}.${arbi.type.replace(/\s/g, '').toLowerCase()}`;
+  } catch (e) {
+    logger.error(`Unable to parse arbitraion: ${JSON.stringify(arbi)}\n${e}`);
+  }
+  return k;
+};
+
+export const events = 'operations';
+export const persistentEnemies = 'enemies';
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_events_kuva.js.html b/handlers_events_kuva.js.html new file mode 100644 index 00000000..5edeabb5 --- /dev/null +++ b/handlers_events_kuva.js.html @@ -0,0 +1,282 @@ + + + + + + + Worldstate Emitter Source: handlers/events/kuva.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/events/kuva.js

+ +
+
+
import { logger, groupBy } from '../../utilities/index.js';
+
+import objectLike from './objectLike.js';
+
+/**
+ * Process kuva fields
+ * @param  {Deps} deps    dependencies for processing
+ * @param  {Object[]} packets  packets to emit
+ * @returns {Object|Object[]}  object(s) to emit from kuva stuff
+ */
+export default (deps, packets) => {
+  if (!deps.data) {
+    logger.error('no kuva data');
+    return undefined;
+  }
+  const data = groupBy(deps.data, 'type');
+  Object.keys(data).forEach((type) => {
+    deps = {
+      ...deps,
+      data: data[type],
+      id: `kuva.${data[type][0].type.replace(/\s/g, '').toLowerCase()}`,
+      activation: data[type][0].activation,
+      expiry: data[type][0].expiry,
+    };
+    const p = objectLike(deps.data, deps);
+    if (p) {
+      packets.push(p);
+    }
+  });
+  return packets.filter((p) => p);
+};
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handlers_events_parse.js.html b/handlers_events_parse.js.html new file mode 100644 index 00000000..9230fc7a --- /dev/null +++ b/handlers_events_parse.js.html @@ -0,0 +1,333 @@ + + + + + + + Worldstate Emitter Source: handlers/events/parse.js + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Source: handlers/events/parse.js

+ +
+
+
import { lastUpdated } from '../../utilities/index.js';
+
+import checkOverrides from './checkOverrides.js';
+import kuvaProcessing from './kuva.js';
+import arrayLike from './arrayLike.js';
+import objectLike from './objectLike.js';
+import nightwave from './nightwave.js';
+import cycleLike from './cycleLike.js';
+import * as eKeyOverrides from './eKeyOverrides.js';
+
+/**
+ * @typedef {Object} Deps
+ * @property {string} key event key being parsed
+ * @property {string} platform platform the event is on
+ * @property {string} language language the event is in
+ * @property {Date} cycleStart start of the current cycle
+ * @property {Object|Array} data data to parse
+ */
+
+/**
+ * Set up current cycle start if it's not been initiated
+ * @param  {Deps} deps    dependencies for processing
+ */
+const initCycleStart = (deps) => {
+  if (!lastUpdated[deps.platform][deps.language]) {
+    lastUpdated[deps.platform][deps.language] = deps.cycleStart;
+  }
+};
+
+/**
+ * Parse new events from the provided worldstate
+ * @param  {Deps} deps dependencies to parse out events
+ * @returns {Packet|Packet[]}      packet(s) to emit
+ */
+export default (deps) => {
+  initCycleStart(deps);
+
+  // anything in the eKeyOverrides goes first, then anything uniform
+  const packets = [];
+  switch (deps.key) {
+    case 'kuva':
+      return kuvaProcessing(deps, packets);
+    case 'events':
+      deps = {
+        ...deps,
+        id: eKeyOverrides[deps.key],
+      };
+    case 'alerts':
+    case 'conclaveChallenges':
+    case 'dailyDeals':
+    case 'flashSales':
+    case 'fissures':
+    case 'globalUpgrades':
+    case 'invasions':
+    case 'syndicateMissions':
+    case 'weeklyChallenges':
+      packets.push(...arrayLike(deps, packets));
+      break;
+    case 'cetusCycle':
+    case 'earthCycle':
+    case 'vallisCycle':
+      packets.push(cycleLike(deps.data, deps));
+      break;
+    case 'persistentEnemies':
+      deps = {
+        ...deps,
+        ...checkOverrides(deps.key, deps.data),
+      };
+    case 'sortie':
+    case 'voidTrader':
+    case 'arbitration':
+    case 'sentientOutposts':
+      deps.id = checkOverrides(deps.key, deps.data);
+      packets.push(objectLike(deps.data, deps));
+    case 'nightwave':
+      packets.push(nightwave(deps.data, deps));
+    default:
+      break;
+  }
+
+  return packets;
+};
+
+
+
+ + + + + +
+
+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/glyphicons-halflings-white.png b/img/glyphicons-halflings-white.png new file mode 100644 index 00000000..3bf6484a Binary files /dev/null and b/img/glyphicons-halflings-white.png differ diff --git a/img/glyphicons-halflings.png b/img/glyphicons-halflings.png new file mode 100644 index 00000000..a9969993 Binary files /dev/null and b/img/glyphicons-halflings.png differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..34ce9967 --- /dev/null +++ b/index.html @@ -0,0 +1,403 @@ + + + + + + + Worldstate Emitter Index + + + + + + + + + + + + + +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+

Worldstate Emitter

+

Suuuper simple emitter for worldstate events.

+

Very opinionated decisions on what events and event names, as well as.... everything else

+

semantic-release: angular

+

Emitter Events

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Emitter EventEmit keydescription
RSSrssNew forum post from DE
Worldstatews:updateNew Worldstate event
TweettweetNew tweet from one of the selected accounts
+
+ Twitter Accounts + +
+
+
Twitter Events +
    +
  • tweet
  • +
  • retweet
  • +
  • reply
  • +
  • quote
  • +
+
+
+
RSS Feeds + +
Staff Replies + +
+
+
+
Other Methods + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodParamsOutput
getRss--Map of RSS feeds with url and items
getWorldstateplatform, localeWorldstate objects
--platformDefaults to pc. One of pc, ps4, xb1, swi.
--localeDefaults to en. Any of the locales included in worldstate-data
+

* Denote required

+
+
+

Help & Contact

+

Discord

+
+ + + + + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/module.html#.exports b/module.html#.exports new file mode 100644 index 00000000..32a877eb --- /dev/null +++ b/module.html#.exports @@ -0,0 +1,1066 @@ + + + + + + + Worldstate Emitter Class: exports + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: exports

+
+ +
+ +

+ exports +

+ +
RSS Emitter, leverages [rss-feed-emitter](https://npmjs.org/package/rss-feed-emitter)
+ + +
+ + +
+
+ + +
+
+

new exports(eventEmitter)

+ + +
+
+ + +
+ Set up emitting events for warframe forum entries +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
eventEmitter + + +EventEmitter + + + + + Emitter to send events from
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +

Class: exports

+
+ +
+ +

+ exports +

+ +
Twitter event handler
+ + +
+ + +
+
+ + +
+
+

new exports(eventEmitter)

+ + +
+
+ + +
+ Create a new Twitter self-updating cache +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
eventEmitter + + +EventEmitter + + + + + emitter to push new tweets to
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +

Class: exports

+
+ +
+ +

+ exports +

+ +
Handler for worldstate data
+ + +
+ + +
+
+ + +
+
+

new exports(eventEmitter, locale)

+ + +
+
+ + +
+ Set up listening for specific platform and locale if provided. +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
eventEmitter + + +EventEmitter + + + + + Emitter to push new worldstate events to
locale + + +string + + + + + Locale (actually just language) to watch
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +

Class: exports

+
+ +
+ +

+ exports +

+ +
Warframe WorldState Cache - store and retrieve current worldstate data
+ + +
+ + +
+
+ + +
+
+

new exports(language, kuvaCache, sentientCache, eventEmitter)

+ + +
+
+ + +
+ Set up a cache checking for data and updates to a specific worldstate set +
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
language + + +string + + + + + Language/translation to track
kuvaCache + + +Cache + + + + + Cache of kuva data, provided by Semlar
sentientCache + + +Cache + + + + + Cache of sentient outpost data, provided by Semlar
eventEmitter + + +EventEmitter + + + + + Emitter to push new worldstate updates to
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quicksearch.html b/quicksearch.html new file mode 100644 index 00000000..8e339fb6 --- /dev/null +++ b/quicksearch.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/scripts/docstrap.lib.js b/scripts/docstrap.lib.js new file mode 100644 index 00000000..09d9272a --- /dev/null +++ b/scripts/docstrap.lib.js @@ -0,0 +1,11 @@ +if(!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"!==c&&!_.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c)}catch(a){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("