0.0.12 • Published 4 years ago

@ivinokur/workspace-client v0.0.12

Weekly downloads
1
License
EPL-2.0
Repository
github
Last release
4 years ago

Workspace client

This is a client for workspace REST API and workspace master JSON-RPC API interactions.

Examples

REST API client

import WorkspaceClient from '@eclipse-che/workspace-client';

const restApiClient = WorkspaceClient.getRestApi();
// get list of workspaces
const promise = restApiClient.getAll();
promise.then((workspaces) => {
    // process workspaces here
});

JSON-RPC API client

import WorkspaceClient from '@eclipse-che/workspace-client';

const entryPoint = '/api/workspace';
const masterApiClient = WorkspaceClient.getJsonRpcApi(entryPoint);
const connectionPromise = masterApiClient.connect(entryPoint);
// get client ID
connectionPromise.then(() => {
    const clientId = masterApiClient.getClientId();
});
const statusChangeHandler = message => {
    const status = message.status;
};
// subscribe to workspace status changes
masterApiClient.subscribeWorkspaceStatus('workspace-id', statusChangeHandler);

License

EPL-2

0.0.11

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.2

4 years ago

0.0.1

5 years ago