FGRibreau / mixpanel-cli

🎩 mixpanel-cli - A complete CLI to query Mixpanel API
https://twitter.com/FGRibreau
10 stars 1 forks source link

Implement Read endpoints (JQL/retention/engage/.../export) #2

Open eugeneware opened 7 years ago

eugeneware commented 7 years ago

Nice work!

However, this app looks like it's more for adding events.

Would be nice to be able to tail log, and even pass a jql query through.

Eg:

$ mixpanel logs -t 
# tail logs - one line of JSON per log entry
$ mixpanel logs -t | jq . # be able to transform / query with the jq command
$ mixpanel logs -t 'function () ...' # jql query
$ mixpanel logs -t @myquery.js # jql query from file

Keep up the great work!

FGRibreau commented 7 years ago

Indeed! The READ side still need to be implemented, with:

But I could not find the live-view API endpoint in the official documentation, did you?

eugeneware commented 7 years ago

Not that I could see, but I've just regularly polled the endpoint passing in my latest ID / timestamp to search for new events.

FGRibreau commented 7 years ago

@eugeneware oh I see, si it would be a JQL command option ! like "-f" for --follow (like in tail -f) or "--stream" to output a stream instead of a response from a single request. Duly noted.

Don't hesitate to send a PR for it if you wish :+1: