Get Multiple Sections
curl --location -g
--request GET 'https://mburger.cloud/api/blocks/884/sections?filter[id]=10088,10047&include=elements' \
--header 'Accept: application/json' \
--header 'X-MBurger-Version: 3' \
--header 'X-MBurger-Token: 1234567890qwertyuiop' \
MBClient.getSections(ofBlock: BLOCK_ID,
elements: true,
success: { (sections, paginationInfo) in
},
failure: { error in
})
val sectionsListener = object: MBSectionsResultListener{
override fun onSectionsApiError(error: String) {
}
override fun onSectionsApiResult(sections: ArrayList<MBSection>,
block_id: Long,
paginationInfos: MBPaginationInfo) {
}
}
MBurgerTasks.askForSections(context = applicationContext,
block_id = BLOCK_ID,
filters = null,
getElements = true,
listener = sectionsListener)
$response = (new MBurger())->getSections($block_id);
// Import MBurger SDK
const mburger = require('mburger');
// Init the connection
const instance = mburger.createClient({
api_key: '1234567890'
});
// Retrieve a specific block
instance.getBlock({
block_id: 884,
locale: 'it',
original_media: false,
filter: {
'id': '10100, 10200, 10300'
}
}).then(result => console.log(result));
MBPaginatedResponse<MBSection> sections = await MBManager.shared.getSections(
blockId: BLOCK_ID,
includeElements: true,
);
Last updated