Marketplace blocks API

Overview

The marketplace blocks API, provides the users with the capability, to fetch blocks from the marketplace and use these blocks within the projects.

Usage - List Blocks in Marketplace

import razor
razor.api.marketplace.blocks()

Arguments

Argument Description
bundlename A name provided to the bundle to which the block belongs to.
publisher Name of the user who published the block

Usage - Import Blocks from Marketplace

import razor
razor.api.marketplace.import_blocks(bundle_list=[mktplace_blocks])

Arguments

Argument Description
bundle_list A List of Marketplace blocks object, which provide the list of marketplace blocks that need to imported.

Examples

Importing a set of blocks from marketplace

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])