Card

class watson_workspace_sdk.models.card.Button(display_text: str, action: str, style: str = 'Primary')

Bases: object

Basic class that handles Button settings for Annotations and Attachments

Attributes

display_text : str
Button text
action : str
Watson Workspace action to execute when button is clicked
style : str
Button style : Primary/Secondary Default is Primary
class watson_workspace_sdk.models.card.Card(title: str, subtitle: str, display_text: str)

Bases: object

Cards are used as part of Action Fulfillment to present multiple options to the user. Each option is displayed as a card. Cards are similar to Annotations in that they have a title, body and optional buttons but also have a subtitle field.

Attributes

type : str
Card type
title : str
Card Title
subtitle : str
Card subtitle
display_text : str
Main body of Card
date : Long
Epoch timestamp in milliseconds
buttons : List[Buttons]
List of buttons for the Card

Methods

add_button(display_text, action, style='PRIMARY') → None

Adds a button to the card :param display_text: Button label text :param action: Watson Workspace action to execute :param style: Button UI Style, default Primary :return: None