Skip to content

Commit

Permalink
update badge
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchypark committed May 4, 2021
1 parent 2faac2d commit 402d610
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 10 deletions.
12 changes: 12 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,28 @@ library(sendgridr)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/mrchypark/sendgridr/workflows/R-CMD-check/badge.svg)](https://github.com/mrchypark/sendgridr/actions)
[![test-coverage](https://github.com/mrchypark/sendgridr/workflows/test-coverage/badge.svg)](https://github.com/mrchypark/sendgridr/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/sendgridr)](https://CRAN.R-project.org/package=sendgridr)
[![metacran downloads](https://cranlogs.r-pkg.org/badges/sendgridr)](https://cran.r-project.org/package=sendgridr)
<!-- badges: end -->


The goal of sendgridr is to mail using r with sendgrid service that provides free 100 mail per day forever.

## Installation

### CRAN
You can install the released version of sendgridr from CRAN with:

```
install.packages("sendgridr")
```

### Github

You can install the developing version of sendgridr from [Github](https://github.com/mrchypark/sendgridr) with:

```
# install.packages("remotes")
remotes::install_github("mrchypark/sendgridr")
```

Expand Down
82 changes: 72 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,29 @@
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/mrchypark/sendgridr/workflows/R-CMD-check/badge.svg)](https://github.com/mrchypark/sendgridr/actions)
[![test-coverage](https://github.com/mrchypark/sendgridr/workflows/test-coverage/badge.svg)](https://github.com/mrchypark/sendgridr/actions)
[![CRAN
status](https://www.r-pkg.org/badges/version/sendgridr)](https://CRAN.R-project.org/package=sendgridr)
[![metacran
downloads](https://cranlogs.r-pkg.org/badges/sendgridr)](https://cran.r-project.org/package=sendgridr)
<!-- badges: end -->

The goal of sendgridr is to mail using r with sendgrid service that
provides free 100 mail per day forever.

## Installation

### CRAN

You can install the released version of sendgridr from CRAN with:

install.packages("sendgridr")

### Github

You can install the developing version of sendgridr from
[Github](https://github.com/mrchypark/sendgridr) with:

# install.packages("remotes")
remotes::install_github("mrchypark/sendgridr")

## Set API key for authentication
Expand Down Expand Up @@ -57,11 +70,20 @@ sendproject1 <- mail()
class(sendproject1)
#> [1] "sg_mail" "list"
sendproject1
#> SendGrid Mail -
#> ✖ to : (required)
#> ✖ from : (required)
#> ✖ subject: (required)
#> ✖ content: (required)
#> $personalizations
#> list()
#>
#> $from
#> [1] ""
#>
#> $subject
#> [1] ""
#>
#> $content
#> list()
#>
#> attr(,"class")
#> [1] "sg_mail" "list"
```

![](https://user-images.githubusercontent.com/6179259/46489370-23453380-c840-11e8-9ca6-7758a92c6e92.png)
Expand All @@ -80,11 +102,51 @@ mail() %>%
to("[email protected]", "3 exam") %>%
subject("test mail title") %>%
body("hello world!")
#> SendGrid Mail -
#> ✔ to : cnt[3] 1 exam <[email protected]>, 2 exam <to ...
#> ✔ from : [email protected] <[email protected]>
#> ✔ subject: nchr[15] test mail title
#> ✔ content: nchr[12] hello world!
#> $personalizations
#> $personalizations$to
#> $personalizations$to[[1]]
#> $personalizations$to[[1]]$email
#> [x] "[email protected]"
#>
#> $personalizations$to[[1]]$name
#> [x] "1 exam"
#>
#>
#> $personalizations$to[[2]]
#> $personalizations$to[[2]]$email
#> [x] "[email protected]"
#>
#> $personalizations$to[[2]]$name
#> [x] "2 exam"
#>
#>
#> $personalizations$to[[3]]
#> $personalizations$to[[3]]$email
#> [x] "[email protected]"
#>
#> $personalizations$to[[3]]$name
#> [x] "3 exam"
#>
#>
#>
#>
#> $from
#> $from$email
#> [x] "[email protected]"
#>
#> $from$name
#> [x] "[email protected]"
#>
#>
#> $subject
#> [x] "test mail title"
#>
#> $content
#> type value
#> 1 text/html hello world!
#>
#> attr(,"class")
#> [1] "sg_mail" "list"
```

## TODO
Expand Down

0 comments on commit 402d610

Please sign in to comment.