zz_get_info: Get info from Zamzar

Description Usage Arguments Details Value Examples

View source: R/zz_get_info.R

Description

Get info on files submitted to Zamzar by account.

Usage

1
zz_get_info(usr = NULL, latest = TRUE)

Arguments

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

latest

Boolean deciding whether or not metadata on all files that have been submitted within a reasonable time frame should be returned.

If switched to FALSE, metadata on all files that have been submitted to the Zamzar API within a reasonable time frame will be returned.

Defaults to TRUE.

The returned dataframe contains the following columns:

  • id: The unique file identifier assigned to a file by Zamzar.

  • extension: The extension representing the format of the file you can download.

  • created_at: The time at which the file was created at the Zamzar servers.

Details

Per default zz_get_info() assumes you want information for the last submitted file. To get information on all the files that have been submitted within a reasonable time frame, set parameter latest to FALSE.

Please note: objects returned from zz_get_info() doesn't differentiate between development or production endpoint. You have to keep track of this yourself.

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

Value

A dataframe.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# Provided a valid token in .Renvirion, a dataframe of metadata for the last 
# submitted file will be returned.
zz_get_info()

# Same as above, we're just passing the key in a variable.
zz_get_info(usr = "key")
 
# Provided a valid token, will return metadata for all files
# submitted to the API within a reasonable time frame.
zz_get_info(usr = "key", latest = FALSE)

# Same as above, we're just utilizing .Renviron.
zz_get_info(latest = FALSE)

## End(Not run)

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