get_config {paws.common} | R Documentation |
Get the service configuration from the service object.
Description
Look up the service configuration from the service object, e.g. when
calling svc$operation()
, get_config()
will look up svc
, then get
any configuration stored in it, as if the operation function were
a method and the service object were a class instance.
Usage
get_config()
Details
get_config
must be called directly by the operation function and
assigned immediately, not provided as an argument to another function.
We look up the service object then fetch its data so we can both support documentation tooltips in RStudio and also have class-object-like behavior. Alternatives that do not support documentation tooltips in RStudio include reference classes (RC), R6 classes, and any modification of the functions at run-time, e.g. inserting the configuration into the function definition for each operation in a particular service object.