Skip to content

Commit

Permalink
add downloads badge
Browse files Browse the repository at this point in the history
  • Loading branch information
calderonsamuel committed Jan 7, 2024
1 parent 9b7b6aa commit b4ada10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ knitr::opts_chunk$set(
[![CRAN status](https://www.r-pkg.org/badges/version/SSEparser)](https://CRAN.R-project.org/package=SSEparser)
[![R-CMD-check](https://github.com/calderonsamuel/SSEparser/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/calderonsamuel/SSEparser/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/calderonsamuel/SSEparser/branch/main/graph/badge.svg)](https://app.codecov.io/gh/calderonsamuel/SSEparser?branch=main)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/last-month/SSEparser?color=blue)](https://r-pkg.org/pkg/SSEparser)
<!-- badges: end -->

The goal of SSEparser is to provide robust functionality to parse Server-Sent Events and to build on top of it.
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ status](https://www.r-pkg.org/badges/version/SSEparser)](https://CRAN.R-project.
[![R-CMD-check](https://github.com/calderonsamuel/SSEparser/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/calderonsamuel/SSEparser/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/calderonsamuel/SSEparser/branch/main/graph/badge.svg)](https://app.codecov.io/gh/calderonsamuel/SSEparser?branch=main)
[![CRAN RStudio mirror
downloads](https://cranlogs.r-pkg.org/badges/last-month/SSEparser?color=blue)](https://r-pkg.org/pkg/SSEparser)
<!-- badges: end -->

The goal of SSEparser is to provide robust functionality to parse
Expand Down Expand Up @@ -90,15 +92,15 @@ response <- httr2::request("https://postman-echo.com/server-events/3") %>%
str(parser$events)
#> List of 3
#> $ :List of 3
#> ..$ event: chr "message"
#> ..$ event: chr "error"
#> ..$ data : chr "{\"event\":\"message\",\"request\":\"POST\"}"
#> ..$ id : chr "1"
#> $ :List of 3
#> ..$ event: chr "message"
#> ..$ data : chr "{\"event\":\"message\",\"request\":\"POST\"}"
#> ..$ id : chr "2"
#> $ :List of 3
#> ..$ event: chr "error"
#> ..$ event: chr "message"
#> ..$ data : chr "{\"event\":\"message\",\"request\":\"POST\"}"
#> ..$ id : chr "3"
```
Expand Down Expand Up @@ -138,7 +140,7 @@ SSEparser$public_methods$append_parsed_sse
#> self$events <- c(self$events, list(parsed_event))
#> invisible(self)
#> }
#> <bytecode: 0x0000022528581ce8>
#> <bytecode: 0x000001d822070e00>
#> <environment: namespace:SSEparser>
```

Expand All @@ -162,7 +164,7 @@ response <- httr2::request("https://postman-echo.com/server-events/3") %>%
str(parser$events)
#> List of 3
#> $ :List of 3
#> ..$ event: chr "message"
#> ..$ event: chr "notification"
#> ..$ data :List of 2
#> .. ..$ event : chr "message"
#> .. ..$ request: chr "POST"
Expand All @@ -174,7 +176,7 @@ str(parser$events)
#> .. ..$ request: chr "POST"
#> ..$ id : chr "2"
#> $ :List of 3
#> ..$ event: chr "ping"
#> ..$ event: chr "info"
#> ..$ data :List of 2
#> .. ..$ event : chr "message"
#> .. ..$ request: chr "POST"
Expand Down

0 comments on commit b4ada10

Please sign in to comment.