public class MixpanelAPI extends Object
| Constructor and Description |
|---|
MixpanelAPI()
Constructs a MixpanelAPI object associated with the production, Mixpanel services.
|
MixpanelAPI(String eventsEndpoint,
String peopleEndpoint)
Create a MixpaneAPI associated with custom URLS for the Mixpanel service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deliver(ClientDelivery toSend)
Sends a ClientDelivery full of messages to Mixpanel's servers.
|
void |
deliver(ClientDelivery toSend,
boolean useIpAddress)
Attempts to send a given delivery to the Mixpanel servers.
|
void |
sendMessage(org.json.JSONObject message)
Sends a single message to Mixpanel servers.
|
public MixpanelAPI()
public MixpanelAPI(String eventsEndpoint, String peopleEndpoint)
eventsEndpoint - a URL that will accept Mixpanel events messagespeopleEndpoint - a URL that will accept Mixpanel people messagesMixpanelAPI()public void sendMessage(org.json.JSONObject message)
throws MixpanelMessageException,
IOException
deliver(ClientDelivery)message - A JSONObject formatted by #MessageBuilderMixpanelMessageException - if the given JSONObject is not (apparently) a Mixpanel message. This is a RuntimeException, callers should take care to submit only correctly formatted messages.IOException - ifpublic void deliver(ClientDelivery toSend) throws IOException
toSend - IOExceptionClientDeliverypublic void deliver(ClientDelivery toSend, boolean useIpAddress) throws IOException
toSend - a ClientDelivery containing a number of Mixpanel messagesIOExceptionClientDeliveryCopyright © 2016. All rights reserved.