Description Usage Format Details Methods Properties Examples
card_section
creates an Section
object which can be added to connector_card
.
1 | # sec <- card_section$new()
|
An R6Class
generator object
Assemble card_section
objects into a action_card
structure and use the methods to append, modify or send your card to the webhook specified.
card_section$new()
Creates a new card_section
.
text(sec_text)
Change the text
field of the section.
title(sec_title)
Change the title
field of the section.
activity_title(sec_activity_title)
Change the title
field of the section.
activity_sub_title(sec_activity_subtitle)
Change the subtitle
field of the section.
activity_image(sec_activity_image)
Change the image
field of the section.
activity_text(sec_activitiy_text)
Change the text
field of the section.
add_fact(fname, fvalue)
Add fact
object 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.
payload
R list of payloads(will be parsed into json)POST
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.