wrapper of http logic for SBG API
sbgapi( auth_token = NULL, version = "1.1", path, method = c("GET", "POST", "PUT", "DELETE"), query = NULL, body = list(), base_url = paste0("https://api.sbgenomics.com/", version, "/") )
auth_token | authenticate token string. |
---|---|
version | API version number, default 1.1. |
path | path connected with base_url. |
method | one of 'GET', 'POST', 'PUT', 'Delete' |
query | Passed to httr package GET/POST call. |
body | Passed to httr package GET/POST/PUT/DELETE call. |
base_url | defeault is 'https://api.sbgenomics.com/1.1' |
returned request list of httr
Used for advanced users and the core method for higher level API in this package, please refer to the easy api manual and the two vignettes pages for more convenient usage.
https://docs.sbgenomics.com/display/developerhub/API
token <- "fake_token" # \donttest{ ## list projects sbgapi(auth_token = token, path = 'project', method = "GET")#> Response [https://api.sbgenomics.com/1.1/project] #> Date: 2021-03-04 02:56 #> Status: 404 #> Content-Type: application/json #> Size: 36 B #># }