@snap/camera-kit
Version:
Camera Kit Web
46 lines (25 loc) • 1.15 kB
Markdown
[CameraKit Web SDK - v0.22.0](../README.md) / [Exports](../modules.md) / RemoteApiService
# Interface: RemoteApiService
Service to handle a lens Remote API request.
## Table of contents
### Properties
- [apiSpecId](RemoteApiService.md#apispecid)
### Methods
- [getRequestHandler](RemoteApiService.md#getrequesthandler)
## Properties
### apiSpecId
• **apiSpecId**: `string`
Remote API spec ID(s).
## Methods
### getRequestHandler
▸ **getRequestHandler**(`request`, `lens`): `undefined` \| [`RemoteApiRequestHandler`](../modules.md#remoteapirequesthandler)
This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.
If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `request` | [`RemoteApiRequest`](RemoteApiRequest.md) | Remote API request object. |
| `lens` | [`Lens`](Lens.md) | Lens that triggers the request. |
#### Returns
`undefined` \| [`RemoteApiRequestHandler`](../modules.md#remoteapirequesthandler)
A request handler if applicable.