| card_section {teamr} | R Documentation |
Create a card_section Structure With teamr
Description
card_section creates an Section object which can be added to connector_card.
Usage
# sec <- card_section$new()
Format
An R6Class generator object
Details
Assemble card_section objects into a action_card
structure and use the methods to append, modify or send your card to the webhook specified.
Methods
card_section$new()Creates a new
card_section.text(sec_text)Change the
textfield of the section.title(sec_title)Change the
titlefield of the section.activity_title(sec_activity_title)Change the
titlefield of the section.activity_sub_title(sec_activity_subtitle)Change the
subtitlefield of the section.activity_image(sec_activity_image)Change the
imagefield of the section.activity_text(sec_activitiy_text)Change the
textfield of the section.add_fact(fname, fvalue)Add
factobject to section.add_link_button(btext, burl)Add button with links.
add_image(sec_image, sec_title)Change webhook address.
print()Print out the current payload.
dump()Dump current payload.
Properties
payloadR 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")
sec$text("2018-19 Finals MVP")
sec$activity_sub_title("Kawhi Leonard")
sec$add_fact("Position", "Forward")
sec$title("Player Info")
sec$add_image(sec_image = "https://....jpg", sec_title = "so funny")
sec$activity_image("https://.....jpg")
sec$activity_title("Activity Title")
sec$activity_sub_title("Activity Subtitle")
sec$activity_text("Activity text")
cc$add_section(new_section = sec)
cc$print()
cc$send()
## End(Not run)
[Package teamr version 0.0.1 Index]