Response: Process service responses to tibble and other data...

Description Usage Arguments Value Examples

Description

Process service responses to tibble and other data structures.

Usage

1
2
3
4
5
6
7
flatten(x)

## S4 method for signature 'response'
str(object)

## S3 method for class 'response'
as.list(x, ..., as = c("text", "raw", "parsed"))

Arguments

x

A 'response' object returned by the service.

object

A 'response' object returned by the service.

...

not currently used

as

character(1); one of 'raw', 'text', 'parsed'

Value

'flatten()' returns a 'tibble' where each row correseponds to a top-level list element of the return value, and columns are the unlisted second and more-nested elements.

'str()' displays a compact representation of the list-like JSON response; it returns 'NULL'.

'as.list()' retruns the content of the web service request as a list.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
if (gcloud_exists()) {
    leonardo <- Leonardo()
    leonardo$listClusters() %>% flatten()
}

if (gcloud_exists())
   leonardo$getSystemStatus() %>% str()

if (gcloud_exists())
    leonardo$getSystemStatus() %>% as.list()

AnVIL documentation built on Nov. 8, 2020, 4:57 p.m.