mockaRoo: Generate data from mockaroo

Description Usage Arguments Value Examples

Description

By supplying a number of parameters and a target schema, this function returns mock data.

Usage

1
mockaroo(outputFormat, queryArgs, schema)

Arguments

outputFormat

Desired response format c("csv", "json", "txt", "custom")

queryArgs

List of arguments regarding the overall query, must include "key = mykey"

schema

A JSON representation of the desired schema. Request body

Value

Mocked data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 basicSchema<-data.frame(
 name = "blah"
 , percentBlank = 0
 , type = "Color"
 )

 mockaroo("json"
 , list( key = "48b71860"
         , count = 10)
 , schema = jsonlite::toJSON(basicSchema)
 )

stephlocke/mockaRoo documentation built on May 30, 2019, 3:37 p.m.