This is an pre-release of this Package for testing its functionality, please do not download it unless told to do
An module to track EliteDangerous Data with DK Servers
This was made for our Group who you can find here: ED Guilded For more info contact us here
To Install it:
npm i @fightingdoggo/edreader
npm install ed-tracker
[D] - Depricated
api is currently not done yet, it will be used for direct communication with the server in the future
The login Function is used to connect to the Server using an API Key given out in our before mentioned Guilded Server.
Example:
EDTracker.login('Your_API-Key_Here')
Deprecated, now listen on the EDTracker itself!
Exists for Backwards compatibility only, and might not be included in future versions
The events EventStream is used to read Data from the Incoming connections and logs from internal scripts
There are 2 Types of Events so far:
Event | Data |
---|---|
data | Data is used for sending Debug Info and Errors from the script, as of now these are not separated yet |
message | The Message Event is used for receiving Data from the Server side. These can be Infos for the connection to the Server, upcoming events or acknowledge that an request was successful |
Example:
const Tracker = new EDTracker
const stream = Tracker.events
// log Info and Errors in console with "data"
stream.on("data", data)
The Send Function is used to directly send data to the Server. Due to how it is processed, it is recommended to not to send Data directly to the Server to get a valid response. For more info for how the data is processed contact us here.
Example:
EDTracker.send("Ping")
// The server would now send an message event with the data "Pong"
AppendStream is used to append an edreader
EventStream to this instance of EDTracker
.
This will then automatically send all Journal Entries to the Server to be processed.
Do not use this if you are manually sending data with
EDTracker.send()
Example:
let Tracker = new EDTracker
let Reader = require('@fightingdoggo/edreader') //v1.0.4 or higher
Reader.startAll() // starts all Listeners
Tracker.appendStream(Reader, 'allData')
// will send all Events to the Server
For all events see: https://www.npmjs.com/package/@fightingdoggo/edreader
To Receive Events simply listen for events on the main class:
EDTracker.on("Event_Name", data => {
console.log(data)
})
There are 2 Types of Events so far:
Event | Data |
---|---|
data | Data is used for sending Debug Info and Errors from the script, as of now these are not separated yet |
message | The Message Event is used for receiving Data from the Server side. These can be Infos for the connection to the Server, upcoming events or acknowledge that an request was successful |