searchBlock
Recherche rapide d'objets de bloc avec une sortie limitée. Cela renvoie une promesse qui se résout en un tableau d'objets ISearchBlock.
Description
Blocks.searchBlock(
name*,
langCode
);
Parameters schema
Schema
name(obligatoire): string
Chaîne de recherche
exemple : "product_block"
langCode: string
Code de langue. Par défaut : "en_US"
exemple : "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
Identifiant unique du bloc de recherche.
exemple : 1
identifier: string
Identifiant unique sous forme de chaîne pour le bloc de recherche.
exemple : "search_block_1"
name: string
Nom du bloc de recherche.
exemple : "Search Block 1"