BlockCMS - AquilaCMS/aquila-connector GitHub Wiki
/src/api/blockcms/index.js
getBlockCMS(code, lang)
code-string: blockcms's codelang-string?: current language ("fr"is the default value) - Optional
Example
import { getBlockCMS } from 'aquila-connector/api/blockcms';
const oneBlockCMS = await getBlockCMS("code", "fr");getBlocksCMS(codes, lang, postBody)
codes-array[string]: Array of blockcms's codelang-string?: current language ("fr"is the default value) - OptionalpostBody-any: in the case where we want to recover the CMS blocks other than by the codes
Examples
import { getBlocksCMS } from 'aquila-connector/api/blockcms';
const allBlockCMS = await getBlocksCMS(["code1", "code2"], "fr");import { getBlocksCMS } from 'aquila-connector/api/blockcms';
const postBody = {"filter": { "code": "code" }, "limit": 99, "structure": { "translation": 1 }};
const allBlockCMS = await getBlocksCMS([], "fr", postBody);