Umbra::ProjectApi class

Interface to Umbra project web API.

The Umbra project API can be used to query projects and models associated with an account

Public static functions

static auto connect(UmbraClient* client, const char* credentials) -> ProjectApi*
Connect to Umbra project API.
static void disconnect(ProjectApi* api)
Disconnect from project API. This releases all associated resources, including Project and Model handles.

Public functions

auto changeCredentials(const char* credentials) -> bool pure virtual
Log in with a different account. Returns success. On failure previous credentials are not restored.
auto getProjects() -> ProjectRequest* pure virtual
Returns an asynchronous request to list all projects associated with the current account; pump must be called periodically for any outstanding project request to make progress.
auto createModel(Uuid projectId, const char* modelName) -> ModelCreateRequest* pure virtual
Returns an asynchronous request to create a new model associated with the given project; pump must be called periodically for any outstanding project request to make progress.
void releaseProjectRequest(ProjectRequest* request) pure virtual
Release a ProjectRequest and any associated ProjectList ProjectList manages all its projects, so Project references are invalidated when ProjectList is released.
void releaseModelCreateRequest(ModelCreateRequest* request) pure virtual
Release a ModelCreateReqeust. If the request was completed the Model Uuid will remain valid.
void pump() pure virtual
Must be called periodically so that outstanding requests can make progress.

Function details

static ProjectApi* Umbra::ProjectApi::connect(UmbraClient* client, const char* credentials)

Connect to Umbra project API.

Parameters
client Context & platform integration utilities to use. Determines http implementation to use.
credentials Cloud Token for an account. Any operations with the API instance will read and write data for this user.