QuantaCorp ReactJS SDK
ApiSession
Session for the QuantaCorp API.
This session will make the implementation of the QuantaCorp API into your app easier.
Kind: global class
- ApiSession
- .authenticateWithUsernameAndPassword() ⇒
Object
- .authenticateWithRefreshToken() ⇒
Object
- .authenticateWithJWT() ⇒
Object
- .createBody(bodyDTO) ⇒
Number
- .registerAsyncScan(projectId, bodyId) ⇒
Number
- .uploadAsyncScanData(asyncScanId, pose, scanData)
- .addAsyncScanCallbacks(asyncScanId, callbacks)
- .processAsyncScan(asyncScanId)
- .getAsyncScanStatus(asyncScanId)
- .authenticateWithUsernameAndPassword() ⇒
apiSession.authenticateWithUsernameAndPassword() ⇒ Object
Authenticate with the QuantaCorp authorization API using a username and password to obtain a bearer token.
Kind: instance method of ApiSession
Returns: Object
- Token object with an access_token, a refresh_token and expires_in in seconds
apiSession.authenticateWithRefreshToken() ⇒ Object
Authenticate with the QuantaCorp authorization API using a refresh token to obtain a bearer token.
Kind: instance method of ApiSession
Returns: Object
- Token object with an access_token, a refresh_token and expires_in in seconds
apiSession.authenticateWithJWT() ⇒ Object
Authenticate with the QuantaCorp authorization API using a JWT to obtain a bearer token.
Kind: instance method of ApiSession
Returns: Object
- Token object with an access_token and expires_in in seconds
apiSession.createBody(bodyDTO) ⇒ Number
Create a body resource
Kind: instance method of ApiSession
Returns: Number
- bodyId
Param | Type | Description |
---|---|---|
bodyDTO | Object |
{ company_id: number, link_to_project: number, alias:string, height: number, gender: string } |
apiSession.registerAsyncScan(projectId, bodyId) ⇒ Number
Register an async scan.
Kind: instance method of ApiSession
Returns: Number
- asyncScanId
Param | Type |
---|---|
projectId | Number |
bodyId | Number |
apiSession.uploadAsyncScanData(asyncScanId, pose, scanData)
Upload scan data (image and metadata) for an async scan
Kind: instance method of ApiSession
Param | Type |
---|---|
asyncScanId | Number |
pose | String |
scanData | Object |
apiSession.addAsyncScanCallbacks(asyncScanId, callbacks)
Add callbacks to an async scan
Kind: instance method of ApiSession
Param | Type |
---|---|
asyncScanId | Number |
callbacks | Object |
apiSession.processAsyncScan(asyncScanId)
Process an async scan for which the front and side picture is uploaded.
Kind: instance method of ApiSession
Param | Type |
---|---|
asyncScanId | Number |
apiSession.getAsyncScanStatus(asyncScanId)
Get the status of an async scan.
Kind: instance method of ApiSession
Param | Type |
---|---|
asyncScanId | Number |
Scan ⇐ Component
Kind: global class
Extends: Component
- Scan ⇐
Component
- instance
- static
scan.initialise(gender, height) ⇒ bool
Initialise the scan component with the gender and height of the person being scanned. Returns a boolean representing the success of the initialisation call.
Kind: instance method of Scan
Param | Type |
---|---|
gender | * |
height | * |
scan.present()
Presents the scan view by changing the zIndex.
Kind: instance method of Scan
Scan.Scan
Kind: static class of Scan
new Scan(props)
Creates an instance of Scan the view component of the ReactJS SDK. This component renders the scan view. Call .initialise(gender, height) before .present().
Param | Type |
---|---|
props | scanPropTypes |
scanPropTypes : *
Kind: global constant
Property | Type |
---|---|
zIndex | Number |
onDidAppear | Func |
onFrontCaptured | Func |
onSideCaptured | Func |
onWillDisappear | Func |
onCancel | Func |
onError | Func |
debug | Bool |
onDebug | Func |
defaultScanProps : *
Kind: global constant
Property | Default value |
---|---|
zIndex | 3000 |
debug | false |