DEV Community

Alexey Timin for ReductStore

Posted on • Originally published at reduct.store

ReductStore Client SDK for C++ v1.2.0

We are excited to announce the release
of ReductStore Client SDK for C++ v1.2.0! This release
includes updated
documentation after we renamed the project from "Reduct Storage" to "ReductStore", and supports ReductStore HTTP API
1.2.0
with the endpoint GET /api/v1/me.

One of the useful features of the ReductStore Client SDK is the ability to retrieve information about the authenticated
user using the IClient::Me method. Here is an example of how to use this method:

#include <reduct/client.h>

#include <iostream>

using reduct::IBucket;
using reduct::IClient;

int main() {
  auto client = IClient::Build("https://play.reduct.store", {.api_token="my-token"});
  auto [token_info, err] = client->Me();
  if (err) {
    std::cerr << err << std::endl;
    return 1;
  }

  std::cout << token_info.full_access << std::endl;
  return 0;
}

Enter fullscreen mode Exit fullscreen mode

We hope you find the ReductStore Client SDK for C++ v1.2.0 useful in your projects! Let us know
if you have any questions or feedback, don't hesitate to reach out in Discord
or by opening a discussion on GitHub.

Top comments (0)