Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

mediumr

Travis build status

R Interface to Medium API.

Installation

You can install mediumr from github with:

# install.packages("devtools")
devtools::install_github("yutannihilation/mediumr")

Addin

Using "Post to Medium" addin, you can post Rmd file to Medium directly:

Other Usages

Authentication

Issue an API token and set it as an environmental variable MEDIUM_API_TOKEN. You should add this line in your .Renviron:

MEDIUM_API_TOKEN='<your api token here>'

Get Current User

library(mediumr)

medium_get_current_user()
#> $id
#> [1] "5303d74c64f66366f00cb9b2a94f3251bf5"
#> 
#> $username
#> [1] "majelbstoat"
#> 
#> $name
#> [1] "Jamie Talbot"
#> 
#> $url
#> [1] "https://medium.com/@majelbstoat"
#> 
#> $imageUrl
#> [1] "https://images.medium.com/0*fkfQiTzT7TlUGGyI.png"

Create A Post

content <- "
# test

1. test1
2. test2

```r
this <- is(test)
```
"
medium_create_post("test", content = content)

Upload An Image

medium_upload_image("/path/to/image.png")

Limitations

  • Since Medium doesn't provide update API, you cannot update existing posts via mediumr.
  • Medium doesn't support tables. So, it makes little sense to use knitr::kabble() or formattable::formattable() for printing data.frames.

About

R Interface to Medium API

Resources

License

Releases

No releases published

Packages

No packages published

Languages