ropensci-archive / nbaR

:warning: ARCHIVED :warning: R client library for the Netherlands Biodiversity Api (NBA)
Other
3 stars 2 forks source link

Pretty printing? #39

Closed hettling closed 5 years ago

hettling commented 5 years ago

I wonder whether it would be better to have some more human readable representation when a client query result is printed? The current output is:


> # specify two query conditions
> l <- list(identifications.typeStatus="holotype", sex="female")
> # run query
> res <- client$query(queryParams=l)
> res
<Response>
  Public:
    clone: function (deep = FALSE)
    content: QueryResult, R6
    initialize: function (content, response)
    response: response

Users might expect something that would tell how many results were returned by the query, and maybe some information about the first couple of results. A public print method that provides some of this information would be nice. Note that this might not be necessary to add to these classes if there are wrapper functions that users are calling instead.