get_data_from_rapidpro_api: Calling data from RapidPro API

View source: R/get_data_from_rapidpro_api.R

get_data_from_rapidpro_apiR Documentation

Calling data from RapidPro API

Description

A generalised way to call data from the RapidPro API.

Usage

get_data_from_rapidpro_api(
  call_type,
  rapidpro_site = get_rapidpro_site(),
  token = get_rapidpro_key(),
  flatten = FALSE,
  date_from = NULL,
  date_to = NULL,
  format_date = "%Y-%m-%d",
  tzone_date = "UTC"
)

Arguments

call_type

A string containing the call type; for example, "flows.json".

rapidpro_site

A string containing the rapidpro website to call the data from. See set_rapidpro_site() to amend the website.

token

A string containing the token to call the data. See set_rapidpro_key() to amend the token.

flatten

Default FALSE. A boolean denoting whether the data should be flattened into a two-dimensional tabular structure.

date_from

character string giving the date to filter the data from.

date_to

character string giving the date to filter the data to.

format_date

from ⁠as.POSIX*⁠ function: character string giving a date-time format as used by strptime.

tzone_date

from ⁠as.POSIX*⁠ function: time zone specification to be used for the conversion, if one is required. System-specific (see time zones), but "" is the current time zone, and "GMT" is UTC (Universal Time, Coordinated). Invalid values are most commonly treated as UTC, on some platforms with a warning.

Value

A data frame of the data specified in the call_type parameter.


lilyclements/Rapidreadr documentation built on April 17, 2025, 6:10 p.m.