Learn R Programming

sbgr (version 1.0.0)

sbgapi: wrapper of http logic for SBG API

Description

wrapper of http logic for SBG API

Usage

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, "/"))

Arguments

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'

Value

returned request list of httr

Details

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.

References

https://docs.sbgenomics.com/display/developerhub/API

Examples

Run this code
token <- "fake_token"

## list projects
sbgapi(auth_token = token, path = 'project', method = "GET")

Run the code above in your browser using DataLab