Home > LIB_Device > getByLcscIds
LIB_Device.getByLcscIds() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Get a device using an LCSC C number
Signature
function getByLcscIds<T extends boolean>(
lcscIds: string,
libraryUuid?: string,
allowMultiMatch?: T,
): Promise<T extends true ? ILIB_DeviceSearchItem | undefined : Array<ILIB_DeviceSearchItem>>;2
3
4
5
Parameters
Parameter | Type | Description |
|---|---|---|
lcscIds | string | LCSC C number |
libraryUuid | string | (Optional) Library UUID, default is system library, you can use LIB_LibrariesList APIs in |
allowMultiMatch | T | (Optional) Whether a single LCSC C number is allowed to match multiple results |
Returns
Promise<T extends true ? ILIB_DeviceSearchItem | undefined : Array<ILIB_DeviceSearchItem>>
Searched device properties
Remarks
By default, if multiple devices with the same C number are matched in the same library, only the first result will be returned;
If you want to return multiple results, set allowMultiMatch to true;
This API is temporarily unavailable in the private deployment environment