action_card: Create a 'action_card' Structure With 'teamr'

Description Usage Format Details Methods Properties Examples

Description

action_card creates a potentialAction object which can be added to connector_card.

Usage

1
# 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 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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

teamr documentation built on July 18, 2019, 5:04 p.m.