webAPI

SDK3DVerse. webAPI

User and session management class.

Methods

(async) createOrJoinSession(sceneUUID) → {object}

Find and join an existing session on the requested scene, or create a new session if none are running.

Parameters:
Name Type Description
sceneUUID string

Scene unique identifier

Returns:

connectionInfo - Connection information required by startStreamer

Type
object

(async) createSession(sceneUUID) → {object}

Create and join a new session from the 3dverse platform.

Parameters:
Name Type Description
sceneUUID string

Scene unique identifier

Returns:

connectionInfo - Connection information required by startStreamer

Type
object

(async) httpDelete(url, params) → {string}

Send a delete request to the 3dverse API gateway

Parameters:
Name Type Description
url string

API gateway service url

params object

Requests parameters

Returns:

Response

Type
string

(async) httpGet(url, params) → {string}

Request data from the 3dverse API gateway

Parameters:
Name Type Description
url string

API gateway service url

params object

Requests parameters

Returns:

Response

Type
string

(async) httpPost(url, params) → {string}

Post a request to the 3dverse API gateway

Parameters:
Name Type Description
url string

API gateway service url

params object

Requests parameters

Returns:

Response

Type
string

(async) joinSession(sessionUUID) → {object}

Join an existing session previously started on the 3dverse platform.

Parameters:
Name Type Description
sessionUUID string

Session unique identifier

Returns:

connectionInfo - Connection information required by startStreamer

Type
object

(async) joinSessionAsGuest(guestToken)

Joins an existing session with an unidentified user

Parameters:
Name Type Description
guestToken string

Guest token retrieved from 'session/guestLink' API

(async) login(user, password)

Request login to the 3dverse platform.

Parameters:
Name Type Description
user string

User name

password string

User password

setURL(apiURL)

Set 3dverse api gateway URL. Can be used to override the api URL which is 'https://3dverse.com/api' by default.

Parameters:
Name Type Description
apiURL string

3dverse api endpoint.

(async) startSession(user, password, sceneUUID) → {object}

Create and join a new session from the 3dverse platform using username and password.

Should only be used for testing purposes. Consider using createSession for production use.

Parameters:
Name Type Description
user string

User name

password string

User password

sceneUUID string

Scene unique identifier

Returns:

connectionInfo - Connection information required by startStreamer

Type
object