Initialize an API Client

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
basePath = 'https://cmgd-telemetry-whnnxetv4q-uc.a.run.app'
client = ApiClient$new(basePath = basePath)
api = DefaultApi$new(apiClient = client)
api
## <DefaultApi>
##   Public:
##     AddNextflowEventNextflowEventsPost: function (nextflow.event.model, ...) 
##     AddNextflowEventNextflowEventsPostWithHttpInfo: function (nextflow.event.model, ...) 
##     AddUserUsersPost: function (user.model, ...) 
##     AddUserUsersPostWithHttpInfo: function (user.model, ...) 
##     apiClient: ApiClient, R6
##     clone: function (deep = FALSE) 
##     DeleteUserUsersUidDelete: function (uid, ...) 
##     DeleteUserUsersUidDeleteWithHttpInfo: function (uid, ...) 
##     FilesChangeFilesChangesPost: function (body, ...) 
##     FilesChangeFilesChangesPostWithHttpInfo: function (body, ...) 
##     GenerateDownloadSignedUrlV4FilesSignedGet: function (name, ...) 
##     GenerateDownloadSignedUrlV4FilesSignedGetWithHttpInfo: function (name, ...) 
##     GetNextflowEventNextflowEventsIdGet: function (id, ...) 
##     GetNextflowEventNextflowEventsIdGetWithHttpInfo: function (id, ...) 
##     GetUserUsersUidGet: function (uid, ...) 
##     GetUserUsersUidGetWithHttpInfo: function (uid, ...) 
##     initialize: function (apiClient) 
##     ListFileEventsFilesChangesGet: function (limit = 100, offset = 0, start.date = NULL, end.date = NULL, 
##     ListFileEventsFilesChangesGetWithHttpInfo: function (limit = 100, offset = 0, start.date = NULL, end.date = NULL, 
##     ListNextflowEventsNextflowEventsGet: function (limit = 100, offset = 0, ...) 
##     ListNextflowEventsNextflowEventsGetWithHttpInfo: function (limit = 100, offset = 0, ...) 
##     ListUsersUsersGet: function (...) 
##     ListUsersUsersGetWithHttpInfo: function (...)

Queries

qres = api$ListFileEventsFilesChangesGet()
qres
## <StorageEventCollection>
##   Public:
##     clone: function (deep = FALSE) 
##     fromJSON: function (StorageEventCollectionJson) 
##     fromJSONString: function (StorageEventCollectionJson) 
##     hits: list
##     initialize: function (hits, ...) 
##     toJSON: function () 
##     toJSONString: function ()

Convert to data.frame

hit_list = qres$toJSON()$hits
df = bind_rows(hit_list)
## Rows: 100
## Columns: 19
## $ kind           <chr> "storage#object", "storage#object", "storage#object", …
## $ id             <chr> "data-curatedmetagenomics/pipeline/runs/72777c18-4878-…
## $ selfLink       <chr> "https://www.googleapis.com/storage/v1/b/data-curatedm…
## $ name           <chr> "pipeline/runs/72777c18-4878-4efb-94e5-9d56d0e8daaf/14…
## $ bucket         <chr> "data-curatedmetagenomics", "data-curatedmetagenomics"…
## $ generation     <dbl> 1.600808e+15, 1.600808e+15, 1.600809e+15, 1.600809e+15…
## $ metageneration <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ contentType    <chr> "application/octet-stream", "application/octet-stream"…
## $ timeCreated    <chr> "2020-09-22T21:01:34.516000+00:00", "2020-09-22T21:01:…
## $ updated        <chr> "2020-09-22T21:01:34.516000+00:00", "2020-09-22T21:01:…
## $ size           <int> 7, 11544, 11587, 8, 11853, 9, 11923, 9, 23629, 9, 9, 9…
## $ md5Hash        <chr> "B40PaylN3oT1w6dkum3NgA==", "eMfTWzSJh5FPR+m0HpW1vg=="…
## $ mediaLink      <chr> "https://www.googleapis.com/download/storage/v1/b/data…
## $ crc32c         <chr> "bAhMpg==", "KrBMBA==", "L445hg==", "p3jbjA==", "jwmoo…
## $ etag           <chr> "CJSRra3U/esCEAE=", "CJv9r63U/esCEAE=", "CNbE2rHU/esCE…
## $ eventType      <chr> "OBJECT_FINALIZE", "OBJECT_FINALIZE", "OBJECT_FINALIZE…
## $ eventTime      <chr> "2020-09-22T21:01:34.516172+00:00", "2020-09-22T21:01:…
## $ event_id       <chr> "79414393-1f0b-4b43-acde-a7202990d66e", "e2a2b72d-f7c9…
## $ download_url   <chr> "https://storage.googleapis.com/data-curatedmetagenomi…

Models

class(qres)
## [1] "StorageEventCollection" "R6"
class(qres$hits[[1]])
## [1] "StorageEventReturn" "R6"
StorageEventReturn
## <StorageEventReturn> object generator
##   Public:
##     kind: NULL
##     id: NULL
##     selfLink: NULL
##     name: NULL
##     bucket: NULL
##     generation: NULL
##     metageneration: NULL
##     contentType: NULL
##     timeCreated: NULL
##     updated: NULL
##     size: NULL
##     md5Hash: NULL
##     mediaLink: NULL
##     contentLanguage: NULL
##     crc32c: NULL
##     etag: NULL
##     eventType: NULL
##     eventTime: NULL
##     event_id: NULL
##     download_url: NULL
##     initialize: function (kind, id, selfLink, name, bucket, generation, metageneration, 
##     toJSON: function () 
##     fromJSON: function (StorageEventReturnJson) 
##     toJSONString: function () 
##     fromJSONString: function (StorageEventReturnJson) 
##     clone: function (deep = FALSE) 
##   Parent env: <environment: namespace:metagenomicsClientR>
##   Locked objects: TRUE
##   Locked class: FALSE
##   Portable: TRUE
StorageEventCollection
## <StorageEventCollection> object generator
##   Public:
##     hits: NULL
##     initialize: function (hits, ...) 
##     toJSON: function () 
##     fromJSON: function (StorageEventCollectionJson) 
##     toJSONString: function () 
##     fromJSONString: function (StorageEventCollectionJson) 
##     clone: function (deep = FALSE) 
##   Parent env: <environment: namespace:metagenomicsClientR>
##   Locked objects: TRUE
##   Locked class: FALSE
##   Portable: TRUE