Example #1
0
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

personselector_data = {
    "name": "person-selector-name",
    "placeholder": "example-placeholder",
    "required": "true"
}

print(
    SmsRenderer.renderInBot(personselector_data,
                            SmsRenderer.smsTypes['PERSONSELECTOR']))
Example #2
0
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

button_data = {"name": "example-button", "type": "action", "text": "Submit"}

print(SmsRenderer.renderInBot(button_data, SmsRenderer.smsTypes['BUTTON']))
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

tabale_data = [{
    "Manufacturer": "Apple",
    "Phone": "iPhone",
    "Operating System": "iOS"
}, {
    "Manufacturer": "Samsung",
    "Phone": "Galaxy",
    "Operating System": "Android"
}, {
    "Manufacturer": "Google",
    "Phone": "Google Pixel 3",
    "Operating System": "Android"
}]

print(SmsRenderer.renderInBot(tabale_data, SmsRenderer.smsTypes['TABLE']))
  # },

  "description": 'My description',
  "comment": {
    "body": 'My comments'
  },
  "assignee": {
    "displayName": 'John Smith'
  },
  "showStatusBar": True,
  "type": {
    "name": 'message type'
  },
  "priority": {
    "name": 'message priority'
  },
  "status": {
    "name": 'message status'
  },
  "labels": [
    {
      "text": 'label1'
    },
    {
      "text": 'label2'
    }
  ]
}

print(SmsRenderer.renderInBot(notification_data, SmsRenderer.smsTypes['NOTIFICATION']))
Example #5
0
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

dropdownmenu_data = {
    "name":
    "dropdown-name",
    "required":
    "true",
    "options": [{
        "value": "value1",
        "selected": "true",
        "text": "First Option"
    }, {
        "value": "value2",
        "selected": "false",
        "text": "Second Option"
    }, {
        "value": "value3",
        "selected": "true",
        "text": "Third Option"
    }]
}

print(
    SmsRenderer.renderInBot(dropdownmenu_data,
                            SmsRenderer.smsTypes['DROPDOWN_MENU']))
Example #6
0
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

radiobutton_data = {
    "name": "example-name",
    "value": "example-value",
    "checked": "false",
    "text": "Red"
}

print(
    SmsRenderer.renderInBot(radiobutton_data,
                            SmsRenderer.smsTypes['RADIOBUTTON']))
Example #7
0
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

textarea_data = {
    "name": "exmaple-text-area",
    "placeholder": "example-placeholder",
    "required": "true"
}

print(SmsRenderer.renderInBot(textarea_data, SmsRenderer.smsTypes['TEXTAREA']))
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

checkbox_data = {
    "name": "example-name",
    "value": "example-value",
    "checked": "false",
    "text": "Red"
}

print(SmsRenderer.renderInBot(checkbox_data, SmsRenderer.smsTypes['CHECKBOX']))
Example #9
0
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

info_data = {
    "title": 'Informaiton Title',
    "content": 'This is a information message',
    "description": 'Information message description'
}

print(SmsRenderer.renderInBot(info_data, SmsRenderer.smsTypes['INFORMATION']))
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

textfield_data = {
    "name": "exmaple-text-field",
    "placeholder": "example-placeholder",
    "required": "true",
    "masked": "true",
    "minlength": 1,
    "maxlength": 128
}

print(
    SmsRenderer.renderInBot(textfield_data, SmsRenderer.smsTypes['TEXTFIELD']))
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

table_data = {
    "select": {
        "position": "right",
        "type": "checkbox"
    },
    "header_list": ["H1", "H2", "H3"],
    "body": [["A1", "B1", "C1"], ["A2", "B2", "C2"], ["A3", "B3", "C3"]],
    "footer_list": ["F1", "F2", "F3"]
}

print(SmsRenderer.renderInBot(table_data,
                              SmsRenderer.smsTypes['TABLE_SELECT']))
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

list_data = {
  'title: 'Phones List',
  'content': [
    "iPhone", "Samsung Galaxy", "Google Pixel 3"
  ]
};

print(SmsRenderer.renderInBot(list_data, SmsRenderer.smsTypes['LIST_TEMPLATE']))
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

simple_data = {"title": "test", "content": "testcontent"}

print(SmsRenderer.renderInBot(simple_data, SmsRenderer.smsTypes['SIMPLE']))
import sms_sdk_renderer_python.lib.sms_sdk_renderer as SmsRenderer

alert_data = {"title": 'Alert Title', "content": 'This is a danger alert'}
print(SmsRenderer.renderInBot(alert_data, SmsRenderer.smsTypes['ALERT']))