create_json_dataset: create_json_dataset

Description Usage Arguments Value

View source: R/create_json_dataset.R

Description

Create the JSON body for updating the given fields or creating a new dataset

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
create_json_dataset(
  values = list(title = "Test Create JSON", body = "Test Creation of JSON",
    field_wbddh_dsttl_upi = "123", field_topic = "Poverty", field_wbddh_country =
    c("Antigua and Barbuda", "Armenia"), field_wbddh_data_class = "Not Specified",
    field_wbddh_data_type = "Other", field_license_wbddh = "Data not available"),
  publication_status = "published",
  ddh_fields = ddhconnect::get_fields(),
  lovs = ddhconnect::get_lovs(),
  root_url = dkanr::get_url()
)

Arguments

values

list: list of corresponding values that need to be updated

publication_status

string: status to post the mode, takes values of c("published", "unpublished", "draft")

ddh_fields

dataframe: table of all the data catalog fields by node type

lovs

dataframe: lookup table of the data catalog tids and values

root_url

string: API root URL

Value

json string


tonyfujs/ddhconnect documentation built on June 3, 2020, 10:33 a.m.