Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples for IClient3 interface #30

Open
S-Gilk opened this issue Sep 26, 2023 · 0 comments
Open

Samples for IClient3 interface #30

S-Gilk opened this issue Sep 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@S-Gilk
Copy link

S-Gilk commented Sep 26, 2023

There are currently no examples included in the sdk of using the methods within the IClient3 interface of datalayer.h

As an example, it would be nice to see browseBulkSync used within datalayerclient.cpp

void DataLayerClient::browseBulk()
{
  m_data.setValue("");

  comm::datalayer::BulkRequest req1 = {"/framework/metrics/process",m_data};
  comm::datalayer::BulkRequest req2 = {"/framework/metrics/system",m_data};
  const comm::datalayer::VecBulkRequest vec_req = std::vector<comm::datalayer::BulkRequest> {req1, req2};

  std::vector<comm::datalayer::BulkResponse> vec_res;
  std::string token = m_client3->getAuthToken();
  std::cout<< token << std::endl;
  
  comm::datalayer::BulkResponse res1 = comm::datalayer::BulkResponse();
  m_result = m_client3->browseBulkSync(vec_req, vec_res, token);

  for(auto& res : vec_res){
    if(res.result == comm::datalayer::DlResult::DL_OK){
      printStringList(res.data);
    }
  }
}
@albrecht-j albrecht-j added the enhancement New feature or request label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants