Harry - You might take a look at the recently released REST module in the Appstore. It looks like this module could fit the bill for you. I took a look at the integrations available from mixpanel, and you I think REST could fit the bill for performing http interaction with mixpanel - as described here: Mixpanel HTTP API Reference
Hope that helps, Mike
You should also look at other existing widgets on the appstore to get an idea on how they are built and you may be able to reuse some of the functionality.
I had a look at the mix panel api and they have a java api: https://mixpanel.com/help/reference/java
I would suggest using the java api, which seems to do what you need.