mixpanel / mixpanel-java

Other
49 stars 37 forks source link

Make stdPeopleMessage protected #9

Closed ceedubs closed 10 years ago

ceedubs commented 10 years ago

There are a number of "people" operations that are not supported through the Java API (such as $unset). Currently users are forced to reimplement (read: copy/paste) the logic in stdPeopleMessage when they should be able to add a simple one-line method that calls through to stdPeopleMessage with a specific actionType.

ceedubs commented 10 years ago

Actually $unset is a bad example because it expects a JSON array not a JSON object.

I'll use my own workaround for now, but it would be really nice to see support for these other methods in the Java client.

joeatwork commented 10 years ago

Hey, I've just cut a new release (1.4.0) that includes both unset() and makes stdPeopleMessage public (renamed to peopleMessage, with appropriate warnings.) Thanks for bringing this up!

joeatwork commented 10 years ago

Please let us know if 1.4.0 fixes your issue (or if you still have to work around things)

ceedubs commented 10 years ago

@joeatwork you've gone above and beyond what I requested and on the same day. Thank you! I gave it a try and it's working for me.

Having peopleMessage accept any type of Object is a little gnarly, but for the most part people should be calling the more specific (and better typed) methods anyway.

joeatwork commented 10 years ago

Great to hear it's working for you!