File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
iterableapi/src/main/java/com/iterable/iterableapi Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,20 @@ public void updateEmail(String newEmail) {
299299 _email = newEmail ;
300300 }
301301
302+ public void updateUser (JSONObject dataFields ) {
303+ JSONObject requestJSON = new JSONObject ();
304+
305+ try {
306+ requestJSON .put (IterableConstants .KEY_EMAIL , _email );
307+ requestJSON .put (IterableConstants .KEY_DATAFIELDS , dataFields );
308+ }
309+ catch (JSONException e ) {
310+ e .printStackTrace ();
311+ }
312+
313+ sendRequest (IterableConstants .ENDPOINT_UPDATEUSER , requestJSON );
314+ }
315+
302316 public void disablePush (String iterableAppId , String gcmProjectId ) {
303317 registerForPush (iterableAppId , gcmProjectId );
304318
Original file line number Diff line number Diff line change @@ -27,15 +27,17 @@ public final class IterableConstants {
2727 public static final String KEY_USER = "user" ;
2828 public static final String KEY_ITEMS = "items" ;
2929 public static final String KEY_TOTAL = "total" ;
30-
30+
31+ public static final String ENDPOINT_DISABLEDEVICE = "users/disableDevice" ;
3132 public static final String ENDPOINT_PUSHTARGET = "push/target" ;
3233 public static final String ENDPOINT_REGISTERDEVICETOKEN = "users/registerDeviceToken" ;
3334 public static final String ENDPOINT_TRACK = "events/track" ;
3435 public static final String ENDPOINT_TRACKCONVERSION = "events/trackConversion" ;
3536 public static final String ENDPOINT_TRACKPURCHASE = "commerce/trackPurchase" ;
3637 public static final String ENDPOINT_TRACKPUSHOPEN = "events/trackPushOpen" ;
3738 public static final String ENDPOINT_UPDATEEMAIL = "users/updateEmail" ;
38- public static final String ENDPOINT_DISABLEDEVICE = "users/disableDevice" ;
39+ public static final String ENDPOINT_UPDATEUSER = "users/update" ;
40+
3941
4042 public static final String PUSH_APPID = "IterableAppId" ;
4143 public static final String PUSH_PROJECTID = "GCMProjectNumber" ;
You can’t perform that action at this time.
0 commit comments