Learn R Programming

leanpubr (version 0.4.0)

lp_download: Leanpub Download Latest Version

Description

Leanpub Download Latest Version

Usage

lp_download(
  slug,
  format = c("pdf", "epub"),
  api_key = NULL,
  secure = TRUE,
  verbose = TRUE,
  ...
)

Value

List of the result of the GET call and the content

Arguments

slug

slug of the project

format

format of the book to download

api_key

API key for Leanpub, passed to lp_api_key

secure

passed to lp_base_url for https

verbose

print diagnostic messages

...

additional options to pass to GET

Examples

Run this code
if (lp_have_api_key()) {
slug = "biostatmethods"
res = lp_download(slug, verbose = FALSE, nonstop = TRUE, error = FALSE,
format = "epub")
file.exists(res)
}

Run the code above in your browser using DataLab