The marketplace blocks API, provides the users with the capability, to fetch blocks from the marketplace and use these blocks within the projects.
import razor
razor.api.marketplace.blocks()
Argument | Description |
---|---|
bundlename | A name provided to the bundle to which the block belongs to. |
publisher | Name of the user who published the block |
import razor
razor.api.marketplace.import_blocks(bundle_list=[mktplace_blocks])
Argument | Description |
---|---|
bundle_list | A List of Marketplace blocks object, which provide the list of marketplace blocks that need to imported. |
STEP 1 - List the blocks in the Marketplace
import razort
mktplace_blocks = razor.api.marketplace.blocks(bundlename='helloworld', publisher='ironman')
STEP 2 - Import the necessary blocks from the marketplace
import razor
razor.api.marketplace.import_blocks(bundle_list=[mktplace_blocks])