Learn R Programming

tuber (version 2.0.0)

add_tuber_attributes: Add standardized metadata attributes to API response

Description

Adds consistent metadata attributes to function return values for better debugging and quota management.

Usage

add_tuber_attributes(
  result,
  api_calls_made = 1,
  quota_used = NULL,
  function_name = NULL,
  parameters = list(),
  timestamp = Sys.time(),
  ...
)

Value

The result object with standardized attributes added

Arguments

result

The result object to add attributes to

api_calls_made

Number of API calls made to generate this result

quota_used

Estimated quota units consumed by the operation. If `NULL`, no quota attribute is added.

function_name

Name of the calling function

parameters

List of key parameters used in the function call

timestamp

When the API call was made

...

Additional custom attributes