Fetch sections
You can retrieve all the sections with a block with the given id with the function getBlocksWithParameters:Success:Failure like this:
1
MBClient.getSections(ofBlock: THE_BLOCK_ID, parameters: nil, success: { (sections, paginationInfo) in
2
3
}, failure: { error in
4
5
})
Copied!
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:
1
MBClient.getSections(ofBlock: THE_BLOCK_ID, parameters: nil, elements: true, success: { (sections, paginationInfo) in
2
3
}, failure: { error in
4
5
})
Copied!
Last modified 1yr ago
Copy link