action_card {teamr} | R Documentation |
Create a action_card
Structure With teamr
Description
action_card
creates a potentialAction
object which can be added to connector_card
.
Usage
# ac <- action_card$new(type = "ActionCard", name = "Add comment")
Format
An R6Class
generator object
Details
Assemble action_card
objects into a action_card
structure and use the methods to append, modify or send your card to the webhook specified.
Methods
action_card$new(type, name)
Creates a new
action_card
.add_text_inputs(id, title, is_multiline)
Add
TextInput
to youraction_card
.add_date_inputs(id, title)
Add
DateInput
to youraction_card
.add_mchoice_inputs(id, title, is_multi_select)
Add
MultichoiceInput
to youraction_card
.dump()
Dump current payload
Properties
payload
R list of payloads(will be parsed into json)POST
Examples
## Not run:
library(teamr)
cc <- connector_card$new(hookurl = "https://outlook.office.com/webhook/...")
cc$text("Of on affixed civilly moments promise explain")
pa <- action_card$new(type = "ActionCard", name = "Add comment")
pa$add_actions()
pa$add_text_inputs(id = "comment", title = "Add comment for this task", is_multi_line = TRUE)
cc$add_potential_action(pa)
cc$send()
## End(Not run)
[Package teamr version 0.0.1 Index]