ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::io::speckle::SpeckleClient Class Reference

Upload-only Speckle client. More...

#include <speckle.hpp>

Public Member Functions

 SpeckleClient (std::string server_url, std::string project_id, std::string token="")
 Construct a client.
std::string send (const Base &root)
 Send a root object and all its children to the server.
std::string commit (const std::string &object_id, const std::string &branch="main", const std::string &message="ReUseX upload")
 Create a commit/version pointing to a root object hash.
std::string upload (const Base &root, const std::string &branch="main", const std::string &message="ReUseX upload")
 Convenience: send + commit in one call.
void set_max_batch_size (std::size_t bytes)
 Max HTTP batch payload size in bytes (default: 25 MB).

Detailed Description

Upload-only Speckle client.

Definition at line 88 of file speckle.hpp.

Constructor & Destructor Documentation

◆ SpeckleClient()

reusex::io::speckle::SpeckleClient::SpeckleClient ( std::string server_url,
std::string project_id,
std::string token = "" )

Construct a client.

Parameters
server_urlSpeckle server URL (e.g. "https://app.speckle.systems")
project_idProject/stream ID
tokenPersonal access token (falls back to SPECKLE_TOKEN env)

Member Function Documentation

◆ commit()

std::string reusex::io::speckle::SpeckleClient::commit ( const std::string & object_id,
const std::string & branch = "main",
const std::string & message = "ReUseX upload" )

Create a commit/version pointing to a root object hash.

Returns
The commit ID.

◆ send()

std::string reusex::io::speckle::SpeckleClient::send ( const Base & root)

Send a root object and all its children to the server.

Returns
The root object hash (MD5 of canonical JSON).

◆ set_max_batch_size()

void reusex::io::speckle::SpeckleClient::set_max_batch_size ( std::size_t bytes)

Max HTTP batch payload size in bytes (default: 25 MB).

◆ upload()

std::string reusex::io::speckle::SpeckleClient::upload ( const Base & root,
const std::string & branch = "main",
const std::string & message = "ReUseX upload" )

Convenience: send + commit in one call.

Returns
The commit ID.

The documentation for this class was generated from the following file: