formatTessiPostRequest: Format a Tessitura Post Request

Description Usage Arguments Value Examples

View source: R/control.R

Description

Since Tessitura requires nested JSON requests in most routes, this function will transform a data frame containing columns with names separated by a point into a nested list or JSON string. Each column should be named like "Keyword.Category.Id" as the function will nest at each subsequent . character.

Usage

1

Arguments

data

A data frame to transform

returnJSON

Return data in JSON or list format. Default is JSON.

Value

A nested JSON string for POST requests to the Tessitura API

Examples

1
2
3
4
5
data <- tribble(
    ~Keyword.Description, ~Keyword.Id, ~Keyword.Category.Id, ~Constituent.Id, ~Id, ~Value,
    "sample string 1", 2, 1, 1, 1, "sample string 3"
)
formattedRequest <- formatTessiPostRequest(data)

gdgkirkley/tessituraR documentation built on Feb. 3, 2022, 6:21 p.m.