Fetch sections

You can retrieve all the sections with a block with the given id with the function getBlocksWithParameters:Success:Failure like this:

MBClient.getSections(ofBlock: THE_BLOCK_ID, parameters: nil, success: { (sections, paginationInfo) in

}, failure: { error in

})

The parameters value is an array of MBParameter objects as described in the previous section.

For the blocks, there’s a version of this function that takes a bool includeElements that indicates whether or not the elements of the section.

If you want to retrieve all the sections of a block and their elements you can call:

MBClient.getSections(ofBlock: THE_BLOCK_ID, parameters: nil, elements: true, success: { (sections, paginationInfo) in

}, failure: { error in

})

Last updated