Render message

Render a message to HTML.

POST https://studyscience.wyzepal.com/api/v1/messages/render

Usage examples

#!/usr/bin/env python3

import wyzepal

# Pass the path to your wyzepalrc file here.
client = wyzepal.Client(config_file="~/wyzepalrc")

# Render a message
request = {
    'content': '**foo**'
}
result = client.render_message(request)
print(result)

More examples and documentation can be found here.

const wyzepal = require('wyzepal-js');

// Pass the path to your wyzepalrc file here.
const config = {
    wyzepalrc: 'wyzepalrc',
};

wyzepal(config).then((client) => {
    // Render a message
    const params = {
        content: '**foo**',
    };

    client.messages.render(params).then(console.log);
});

curl -X POST https://studyscience.wyzepal.com/api/v1/messages/render \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    -d $"content=**foo**"

Arguments

Argument Example Required Description
content "**foo**" Yes

The content of the message.

Response

Return values

  • rendered: The rendered HTML.

Example response

A typical successful JSON response may look like:

{
    "msg": "",
    "rendered": "<p><strong>foo</strong></p>",
    "result": "success"
}