Hello Steven Reubenstone. Here are my replies to your questions.
Harsha Alva so this is the actually http request? What would it look like as one string sent to the server? I am trying to understand how the request functions. Also, the web server is programmed now to only out put from one form of “request” which is what I assume is happening here. So essentially we send a specifically formatted request to web server, server spits out 1 json response, which contains our event data.
There are 4 REST endpoints in total for our database, 2 of which are for querying events.
/events? This endpoint allows you to use parameters to specify constraints or conditions to select a JSON array of events.
/events/arduino This endpoint is for low memory devices like Arduino/NodeMcu. Sending a large array of JSON would be an overkill for a device with just 2 KB of memory.
So this endpoint only spits out a JSON object that will be directly displayed on a screen.
The screenshot below shows the 2 different endpoints in action.
You can find more info about the endpoints in the README, section 4 under Important Stuff.
Am I current in that the database only stores newest event/entry?
Not exactly. it downloads all new events that are added to Mixpanel after the last update timestamp. Only required events (Ex: “Reply”, etc) are downloaded from Mixpanel.
You can configure the required Mixpanel event names in
Node_Server\mixpanel.js (line 16)