SDK
SDK Android v3.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

updateSelf #


updateSelf(content, [options], [callback]) #

Performs a partial update on the current user.

ArgumentsTypeDescription
contentJSON ObjectA plain javascript object representing the user
optionsstring(Optional) Optional arguments
callbackfunction(Optional) Callback handling the response

Options #

FilterTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Return value #

Returns the Kuzzle SDK object to allow chaining.


Callback Response #

Returns the updated user object.

Usage #

JSONObject newContent = new JSONObject()
  .put("firstname", "My Name Is")
  .put("lastname", "Jonas");
kuzzle
  .updateSelf(newContent, new ResponseListener<JSONObject>() {
    @Override
    public void onSuccess(JSONObject user) {
    }
    @Override
    public void onError(JSONObject error) {
    }
  });