zz_post: Post file to Zamzar endpoint

Description Usage Arguments Details Value See Also Examples

View source: R/zz_post.R

Description

Per default ‘zz_post()' assumes that you’re doing development, thus using a development endpoint. Set parameter 'prod' to 'TRUE' to change this behavior.

Usage

1
2
3
4
5
6
7
zz_post(
  file = NULL,
  extension = NULL,
  usr = NULL,
  prod = FALSE,
  verbose = FALSE
)

Arguments

file

The path to the file you want to convert.

extension

The file type you want to convert to. E.g., 'png'.

usr

The username/API key you are using. If not set, the function will check if a key exists as a 'ZAMZAR_USR' variable in '.Renviron' and use that.

See: https://developers.zamzar.com/user

prod

Boolean deciding whether to use production or development endpoint. Defaults to 'FALSE'.

verbose

Boolean deciding whether or not verbose status messages should be returned. Defaults to 'FALSE'.

Details

On differences between endpoints, see: https://developers.zamzar.com/docs#section-Next_steps and https://developers.zamzar.com/docs#section-Rate_Limits

Please note that a Zamzar key passed as argument to 'usr' takes precedence over a Zamzar key extracted from an '.Renviron'.

Value

A status message indicating either success or failure.

See Also

zz_format for a list of formats you can convert to.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# Per default zz_post uses the development endpoint.
zz_post(file = "avatar.emf", extension = "png")

# Setting prod parameter to FALSE is the same as above.
zz_post(file = "avatar.emf", extension = "png", prod = FALSE)

# You need to flip prod to TRUE if you want to use the production endpoint.
zz_post(file = "avatar.emf", extension = "png", prod = TRUE)

# Remember you can always pass a Zamzar key to the usr parameter if you don't
# want to use an .Renviron file.
zz_post(file = "avatar.emf", usr = "key", extension = "png", prod = TRUE)
 

## End(Not run)

zzlite documentation built on March 26, 2020, 7:36 p.m.