Learn R Programming

teamr (version 0.0.1)

action_card: 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")

Arguments

Format

An R6Class generator object

Methods

action_card$new(type, name)

Creates a new action_card.

add_text_inputs(id, title, is_multiline)

Add TextInput to your action_card.

add_date_inputs(id, title)

Add DateInput to your action_card.

add_mchoice_inputs(id, title, is_multi_select)

Add MultichoiceInput to your action_card.

dump()

Dump current payload

Properties

payload

R list of payloads(will be parsed into json)POST

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.

Examples

Run this code
# 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()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab