SDK
SDK C++ v1.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.

This SDK has been deprecated because of stability issues. It is not advised to use it in a production environment.

updateSelf #

Updates the current user object in Kuzzle.

Signature #

kuzzleio::User updateSelf(const std::string& content);

kuzzleio::User updateSelf(const std::string& content, const kuzzleio::query_options& options);

Arguments #

ArgumentsTypeDescription
content
const std::string&
JSON string representing the user content
options
kuzzleio::query_options*
Query options

options #

Additional query options:

OptionType
(default)
Description
queuable
bool

(true)
If true, queues the request during downtime, until connected to Kuzzle again

Return #

A kuzzleio::User object.

Exceptions #

Throws a kuzzleio::KuzzleException if there is an error. See how to handle error.

Usage #

try {
  kuzzle->auth->login("local", R"({"username":"foo","password":"bar"})");
  kuzzleio::User updatedUser = kuzzle->auth->updateSelf(R"({"age": 42})");
  std::cout << updatedUser.content() << std::endl;
  // {"age": 42}
} catch (kuzzleio::KuzzleException &e) {
  std::cerr << e.what() << std::endl;
}