Skip to contents

Helper functions for validating Entrata API requests.

  • validate_entrata_request_endpoint(): Validate Entrata API Endpoint

  • validate_entrata_request_endpoint_method(): Validate Entrata API Endpoint's Method

  • validate_entrata_request_method_params(): Validate Entrata API Endpoint Method's Parameters

  • validate_entrata_request(): Validate Entrata API Request by performing all validation checks

Usage

validate_entrata_request_endpoint(
  endpoint,
  arg = rlang::caller_arg(endpoint),
  call = rlang::caller_env()
)

validate_entrata_request_endpoint_method(
  endpoint,
  method,
  arg_endpoint = rlang::caller_arg(endpoint),
  arg_method = rlang::caller_arg(method),
  call = rlang::caller_env()
)

validate_entrata_request_method_params(
  endpoint,
  method,
  method_params,
  arg_endpoint = rlang::caller_arg(endpoint),
  arg_method = rlang::caller_arg(method),
  arg_method_params = rlang::caller_arg(method_params),
  call = rlang::caller_env()
)

validate_entrata_request(
  endpoint,
  method,
  method_params,
  arg_endpoint = rlang::caller_arg(endpoint),
  arg_method = rlang::caller_arg(method),
  arg_method_params = rlang::caller_arg(method_params),
  call = rlang::caller_env(),
  ...
)

Arguments

endpoint

Entrata API Endpoint to validate. Must be one of the available Entrata API endpoints.

arg, arg_endpoint, arg_method, arg_method_params

Arguments to use for error messages.

call

Environment to use for error messages. Defaults to the calling environment.

method

Entrata API Endpoint Method to validate. Should be one of the available methods for the specified endpoint.

method_params

List of method parameters to validate. Should be a named list corresponding the the specific endpoint/method's available and required parameters.

...

Additional arguments to pass to the underlying validation functions.

Value

All validation functions are used for their side effects have no return values, except for validate_entrata_request() which will return TRUE if validations pass.