data_feed_url: Compose a url to get data via the data feed mechanism

Description Usage Arguments Value Author(s) Examples

View source: R/page_records.R

Description

Creates a url with username and password embedded that can be used to download data using the data-feed mechanism instead of the API. In general, this should be avoided, as the API mechanisms are much safer. Returns a json file with all records submitted since the specified since_id.

Usage

1
2
3
4
5
6
7
8
9
data_feed_url(
  server_name,
  parent_form_id,
  profile_id,
  parent_form_name,
  since_id,
  user_label,
  pw_label
)

Arguments

server_name

String of the iFormBuilder server name

parent_form_id

The id of the parent form

profile_id

The id number of your profile

parent_form_name

The name of the parent form

since_id

The record id indicating where to start downloading

user_label

The name given to the username in the .Renviron file

pw_label

Skips the offset number of records before beginning to return records

Value

A url that can be used to request form data

Author(s)

Ty Garber, Tyler.Garber@dfw.wa.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# Generate a url to retrieve data via the data feed mechanism
url <- data_feed_url(
  server_name = "your_server_name",
  parent_form_id = 456789,
  profile_id = 123456,
  parent_form_name = "spawning_ground_p",
  since_id = 3,
  user_label = "your_user_label",
  pw_label = "your_pw_label")

# Retrieve the form data into an R list
form_data <- jsonlite::fromJSON(url)

## End(Not run)

arestrom/iformr documentation built on Nov. 25, 2021, 11:21 p.m.