Skip to contents

With no types, lists every source type included in the installed build. Supplying names returns the required and optional fields for those types. This requires datum 1.4.0 or newer.

Usage

datum_types(
  types = NULL,
  executable = NULL,
  wd = NULL,
  timeout = getOption("datur.timeout", 300)
)

Arguments

types

Optional character vector of source type names.

executable

Optional explicit executable path.

wd

Optional child-process working directory.

timeout

Positive finite timeout in seconds.

Value

A named list of source type specifications, indexed by type.

Examples

if (datum_available() && datum_version() >= "1.4.0") {
  datum_types("http")
}
#> $http
#> $http$type
#> [1] "http"
#> 
#> $http$description
#> [1] "HTTP/HTTPS URL source"
#> 
#> $http$fields
#> $http$fields[[1]]
#> $http$fields[[1]]$name
#> [1] "type"
#> 
#> $http$fields[[1]]$required
#> [1] TRUE
#> 
#> $http$fields[[1]]$description
#> [1] "Must be \"http\"."
#> 
#> 
#> $http$fields[[2]]
#> $http$fields[[2]]$name
#> [1] "url"
#> 
#> $http$fields[[2]]$required
#> [1] TRUE
#> 
#> $http$fields[[2]]$description
#> [1] "HTTP or HTTPS URL to fetch data from"
#> 
#> 
#> $http$fields[[3]]
#> $http$fields[[3]]$name
#> [1] "headers"
#> 
#> $http$fields[[3]]$required
#> [1] FALSE
#> 
#> $http$fields[[3]]$description
#> [1] "Optional HTTP request headers"
#> 
#> 
#> $http$fields[[4]]
#> $http$fields[[4]]$name
#> [1] "body"
#> 
#> $http$fields[[4]]$required
#> [1] FALSE
#> 
#> $http$fields[[4]]$description
#> [1] "Optional HTTP request body; a non-empty body uses POST instead of HEAD/GET"
#> 
#> 
#> 
#>