tumblrWrite: Write posts from a given tumblog

Description Usage Arguments Value Examples

Description

Posts types are to be detailed. For now, examples are for regular posts.

Usage

1
2
3
4
5
  tumblrWrite(url, user, post, generator = "RTumblr",
    date = NULL, private = FALSE, tags = NULL,
    format = NULL, slug = NULL, state = "published",
    publish_on = NULL, send_to_twitter = NULL,
    post_id = NULL, verbose = FALSE)

Arguments

url

domain of the tumblog to post to, NULL for your primary blog.

user

user list with values email and password.

post

a list with field type and other fields corresponding to the chosen type. See details.

generator

short API client description (64 or fewer characters), defaults to "RTumblr".

date

post (past) date, defaults to NULL for the moment the post is received.

private

boolean whether post is private, defaults to FALSE.

tags

character vector post tags, defaults to NULL.

format

"html" or "markdown", defaults to NULL for the default post format for the user.

slug

post URL slug (55 or fewer characters), defaults to NULL.

state

"published", "draft", "submission", "queue", defaults to "published".

publish_on

used with state "queue", date at which to publish post. Defaults to NULL. Returns 401 error if date format is not understood.

send_to_twitter

if Twitter integration is enabled, "no", "auto" for an automatically generated summary, or a character vector for another message to send to Twitter. Defaults to NULL, which will follow tbe "twitter-enabled" value for this blog.

post_id

for edits, id of the post to modify, defaults to NULL.

verbose

boolean for more verbosity, passed to RCurl

Value

if successful, the new post id, error messages otherwise

Examples

1
2
3
4
5
6
7
8
url <- "(YOU).tumblr.com"
user <- list(email = "XXXXXXXX", password = "XXXXXX")
regular_post <- list(type = "regular", title = "Lorem ipsum",
                     body = "**Hello** _world_")
tumblrWrite(url, user, regular_post)
tumblrWrite(url, user, regular_post, state = "draft", send_to_twitter = "no")
tumblrWrite(url, user, regular_post, send_to_twitter = "no",
            date = "2012-07-01 14:50:04")

fcocquemas/rtumblr documentation built on May 16, 2019, 12:08 p.m.