Function refactoring for R6 object
Closed this issue · 1 comments
program-- commented
Currently, all implemented functions return a tibble
or character
vector. These functions (and future functions) need to be refactored to return a list
containing:
- the data in
tibble
orcharacter
vector form as currently implemented - a
query
attribute - a
next
attribute (if exists) - a
previous
attribute (if exists)
The inclusion of query
, next
, and previous
will allow for traversal, and easier usage of the R6 object -- particularly in the case where an end-user needs to access multiple, sequential resources, or to use the discover endpoint.
program-- commented
For the query
attribute, consider something similar to this:
parameters <- lapply(sys.call()[-1], deparse)
private$.query <- paste0(
ifelse(nchar(names(parameters)) > 0, paste0(names(parameters), " = "), ""),
unlist(parameters),
collapse=", "
)