connector_card: Create a 'connector_card' Structure With 'teamr'

Description Usage Format Details Methods Properties Examples

Description

connector_card is at the very heart of the teamr package.

Usage

1
# cc <- connector_card$new("https://outlook.office.com.....")

Format

An R6Class generator object

Details

Assemble connector_card objects into a connector_card structure and use the methods to append, modify or send your card to the webhook specified.

Methods

connector_card$new(hookurl, proxies, http_timeout)

Creates a new connector_card.

text(mtext)

Change the text field of the card

title(mtitle)

Change the title field of the card

summary(msummary)

Change the summary field of the card.

color(mcolor)

Change the default theme color.

add_link_button(btext, burl)

Add button with links.

newhook(nurl)

Change webhook address.

print()

Print out the current hookurl and payload

send()

Send connector_card to specified Microsoft Teams incomeing webhook URL.

Properties

hookurl

Microsoft Teams incoming webhooks url.

payload

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

proxies

Proxy objects from use_proxy

http_timeout

Timeout of the HTTP request. Default to 3 seconds.timeout

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(teamr)

cc <- connector_card$new(hookurl = "https://outlook.office.com/webhook/...")
#' cc$text("Of on affixed civilly moments promise explain")
cc$title("This is a title")
cc$summary("This is a summary")
cc$add_link_button("This is the button Text", "https://github.com/wwwjk366/teamr")
cc$color("#008000")
cc$print()
cc$send()

## End(Not run)

wwwjk366/teamr documentation built on Nov. 5, 2019, 12:24 p.m.