searchBlock
بحث سريع عن كائنات الكتل مع مخرجات محدودة.
Description
Blocks.searchBlock(
name*,
langCode
);
Parameters schema
Schema
name(required): string
سلسلة البحث
مثال: "product_block"
langCode: string
رمز اللغة. الافتراضي: "en_US"
مثال: "en_US"
Examples
Minimal example
const response = await Blocks.searchBlock('my-marker');
Example with attributes
const response = await Blocks.searchBlock('my-marker', 'en_US');
Example response
[
{
"id": 5,
"identifier": "another",
"name": "another"
},
{
"id": 2,
"identifier": "similar",
"name": "similar"
}
]
Response schema
Schema: ISearchBlock[]
id: number
معرف فريد لكتلة البحث.
مثال: 1
identifier: string
معرف سلسلة فريد لكتلة البحث.
مثال: "search_block_1"
name: string
اسم كتلة البحث.
مثال: "Search Block 1"