amplitude / Amplitude-Node

Server-side Node.js SDK for Amplitude
MIT License
67 stars 20 forks source link

feat(client): Return the Response in both `flush` and `logEvent` #30

Closed kelvin-lu closed 4 years ago

kelvin-lu commented 4 years ago

Adds an ResponseListener that takes in the resolve and rejects from a Promise Which facilitates always returning a response. Adds a simpleClient that has no batching or retrying logic.

Resolves Issue #12

return the SKIPPED_RESPONSE for Status.Skipped and StatusCode=0, which seems more fitting if nothing happens.

kelvin-lu commented 4 years ago

Thanks for the review! 💯 will take a stab at a lil more code sharing. Don't think I want one to extend the other, though.

kelvin-lu commented 4 years ago

closing so I can have two pr's (again)