medium_post: Medium Posts API

Description Usage Arguments See Also Examples

Description

Creates a post on the authenticated user's profile or a given publication.

Usage

1
2
3
4
5
6
medium_create_post(title, contentFormat = c("markdown", "html"),
  content = "", tags = c("R", "rstats"), canonicalUrl = NULL,
  publishStatus = c("draft", "public", "unlisted"),
  license = c("all-rights-reserved", "cc-40-by", "cc-40-by-sa", "cc-40-by-nd",
  "cc-40-by-nc", "cc-40-by-nc-nd", "cc-40-by-nc-sa", "cc-40-zero",
  "public-domain"), notifyFollowers = FALSE, publicationId = NULL)

Arguments

title

The title of the post. Note that this title is used for SEO and when rendering the post as a listing, but will not appear in the actual post. For that, the title must be specified in the content field as well. Titles longer than 100 characters will be ignored. In that case, a title will be synthesized from the first content in the post when it is published.

contentFormat

The format of the content field. There are two valid values, "html", and "markdown".

content

The body of the post, in a valid, semantic, HTML fragment, or Markdown. Further markups may be supported in the future. For a full list of accepted HTML tags, see here. If you want your title to appear on the post page, you must also include it as part of the post content.

tags

Tags to classify the post. Only the first three will be used. Tags longer than 25 characters will be ignored.

canonicalUrl

The original home of this content, if it was originally published elsewhere.

publishStatus

The status of the post. Valid values are "public", "draft", or "unlisted". The default is "draft".

license

The license of the post. Valid values are "all-rights-reserved", "cc-40-by", "cc-40-by-sa", "cc-40-by-nd", "cc-40-by-nc", "cc-40-by-nc-nd", "cc-40-by-nc-sa", "cc-40-zero", "public-domain". The default is "all-rights-reserved".

notifyFollowers

Whether to notifyFollowers that the user has published.

publicationId

Publication ID.

See Also

https://github.com/Medium/medium-api-docs#33-posts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
content <- "
# test

1. test1
2. test2

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

## End(Not run)

yutannihilation/mediumr documentation built on May 29, 2019, 12:19 p.m.