For the complete documentation index, see llms.txt. This page is also available as Markdown.

Obtain only sections with a defined relation

curl https://mburger.cloud/api/blocks/<id>/sections?filter[relation]=<block_id>,<section_id>
-H "Accept: application/json" 
-H "X-MBurger-Token: <token>" 
-H "X-MBurger-Version: 3"
let filterParameter = MBFilterParameter(field: "relation",
                                        value: RELATION_BLOCK_ID + "," + RELATION_SECTION_ID)
MBClient.getSections(ofBlock: BLOCK_ID,
                     parameters: [filterParameter],
                     success: { (sections, paginationInfo) in
                                
                     },
                     failure: { error in
                                
                     })
val arrayFilters = ArrayList<Any>()
filters.add(MBFilterParameter(key = "relation", 
                                 value = RELATION_BLOCK_ID + "," + RELATION_SECTION_ID))

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 = arrayFilters,
                         getElements = true,
                         listener = sectionsListener)

Last updated