sbgapi: wrapper of http logic for SBG API

Description Usage Arguments Details Value References Examples

Description

wrapper of http logic for SBG API

Usage

1
2
3
4
5
6
7
8
9
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'

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.

Value

returned request list of httr

References

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

Examples

1
2
3
4
token <- "fake_token"

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

road2stat/sbgr documentation built on March 9, 2021, 4:33 a.m.