Description Usage Arguments Details Value References Examples
Core HTTP logic for Seven Bridges API
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | api(
token = NULL,
version = "v2",
path = NULL,
method = c("GET", "POST", "PUT", "DELETE", "PATCH"),
query = NULL,
body = list(),
encode = c("json", "form", "multipart"),
limit = getOption("sevenbridges")$limit,
offset = getOption("sevenbridges")$offset,
advance_access = getOption("sevenbridges")$advance_access,
authorization = FALSE,
fields = NULL,
base_url = paste0("https://api.sbgenomics.com/", version, "/"),
...
)
|
token |
API auth token or |
version |
API version number, default is |
path |
path connected with |
method |
one of |
query |
Passed to httr package GET/POST call. |
body |
Passed to httr package GET/POST/PUT/DELETE call. |
encode |
If the body is a named list, how should it be
encoded? Can be one of |
limit |
How many results to return |
offset |
The point at which to start displaying them |
advance_access |
Enable advance access features?
Default is |
authorization |
Logical. Is the |
fields |
All API calls take the optional query parameter fields. This parameter enables you to specify the fields you want to be returned when listing resources (e.g. all your projects) or getting details of a specific resource (e.g. a given project). For example, fields="id,name,size" to return the fields id, name and size for files. More details please check https://docs.sevenbridges.com/docs/the-api#section-general-api-information |
base_url |
defeault is |
... |
passed to GET/POST/PUT/DELETE/PATCH call. |
Used for advanced users and the core method for higher level API in this package, please refer to the easy api vignette and additional vignettes pages for more convenient usage.
returned request list of httr
https://docs.sevenbridges.com/v1.0/page/api
1 2 3 4 5 | token <- "your_token"
# list projects
## Not run:
api(token = token, path = "projects", method = "GET")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.