General blocks

The blocks on this page can be added to any build type, hence considered "general".

Content/Text Block

The Content block is a simple block that can be used to display a title and description. It can be used as an introduction to the quiz (= cover block) or as a conclusion.

Example:

{
    "type": "Content",
    "title": "Welcome to the quiz",
    "description": "This quiz will test your knowledge about the world"
}

Ad Block

In the ad block it is optional to add a title and description.

Adding ad blocks is possible in two ways:

Project ad slots

To add an ad to your build using a project ad slot, you need to add the property projectSlot in the Ad block, consisting of:

PropertyRequiredTypeDescriptionDefault
slotId✓ObjectThe ad slot to use
variablesObjectAn object with key-value pairs to override ad slot variables

Example:

{
    "type": "Ad",
    "projectSlot": {
        "slotId": "123456"
    }
}

Example with variables:

{
    "type": "Ad",
    "projectSlot": {
        "slotId": "123456",
        "variables": {
            "ad-variable-key1": "override-value1"
        }
    }
}

Custom iframe

To be more flexible with ads and to be more independent from the Riddle Creator, you can add an Ad block with the iframe object set, consisting of:

PropertyRequiredTypeDescriptionDefault
url✓URLThe URL the iframe should link to
heightintegerThe height of the iframe in px; automatic resizing does not work with custom iframes80

Example:

{
    "type": "Ad",
    "iframe": {
        "url": "https://www.example.com/ad.html",
        "height": 250
    }
}

Quote Block

The Quote block can be used to display a quote with a author.

Properties

The quote block consists of:

PropertyRequiredTypeDescriptionDefault
title✓stringThe title of the quote block
descriptionstringThe description of the quote block
mediastringA media URL to an image to display as the general image
type✓stringSet to Quote
quoteText✓stringThe quote text
quoteAuthor✓stringThe author of the quote
quoteMediastringA media URL to an image to display as the quote image

Example

{
    "type": "Quote",
    "title": "Inspiring Quote",
    "description": "A quote to inspire you",
    "media": "https://example.com/general-image.jpg",
    "quoteText": "The only limit to our realization of tomorrow is our doubts of today.",
    "quoteAuthor": "Franklin D. Roosevelt",
    "quoteMedia": "https://example.com/quote-image.jpg"
}

Full example

For this example we build a quiz with a content + ad block.

{
    "type": "Quiz",
    "build": {
        "title": "General blocks example (Builder API)",
        "blocks": [
            {
                "type": "Content",
                "title": "Welcome to the quiz",
                "description": "This quiz will test your knowledge about France"
            },
            {
                "type": "MultipleChoice",
                "title": "What is the capital of France?",
                "items": {
                    "Paris": true,
                    "Lissabon": false,
                    "Berlin": false
                }
            },
            {
                "type": "Ad",
                "iframe": {
                    "url": "https://google.com"
                }
            },
            {
                "type": "MultipleChoice",
                "title": "How do you say 'hello' in French?",
                "items": {
                    "Bonjour": true,
                    "Hallo": false,
                    "Ciao": false
                }
            },
            {
                "type": "Quote",
                "title": "Inspiring Quote",
                "quoteText": "The only limit to our realization of tomorrow is our doubts of today.",
                "quoteAuthor": "Franklin D. Roosevelt"
            }
        ]
    }
}