pbPost: Post text to Pastebin

Description Usage Arguments Value Examples

Description

Posts text to pastebin as a guest or as a user.

Usage

1
  pbPost(session_key = "", api_dev_key = "", text = "hello world!", title = "Untitled", expire = "1M", privacy_code = "0")

Arguments

session_key

Session key, generated by /codegetUserKey

api_dev_key

Development key for Pastebin API, from http://pastebin.com/api/

text

Text or vector of elements to be posted. For vectors with mutliple elements, a paste will be created for each element.

title

Title of paste (untitled by default).

expire

Time until post expires. Options are ten minutes, one hour, one day, one week, 2 weeks, one month, or never (respectively: "N", "10M", "1H", "1D", "1W", "2W", "1M")

privacy_code

Whether post is public (default), private, or unlisted ("0", "1", or "2", respectively)

Value

pasteID

The web address of the generated paste(s).

Examples

1
2
3
4
5
6
# text_items <- c("hello world!", "hi there, world!")
# posts <- pbPost(text = text_items, session_key = "Your_session_key_goes_here", expire = "1M")
# posts
# 
# x = runif(150)*100
# pbPost(text = as.character(dput(x)), session_key = "Your_session_key_goes_here", expire = "1M")

troyhill/Pastebin-API documentation built on June 1, 2019, 1:51 a.m.