api_query | R Documentation |
There are a number of different GET and POST endpoints in the GWAS database API. This is a generic way to access them
api_query(
path,
query = NULL,
access_token = check_access_token(),
method = "GET",
silent = TRUE,
encode = "json",
timeout = 300
)
path |
Either a full query path (e.g. for get) or an endpoint (e.g. for post) queries |
query |
If post query, provide a list of arguments as the payload. NULL by default |
access_token |
Google OAuth2 access token. Used to authenticate
level of access to data. By default, checks if already authenticated
through |
method |
GET (default) or POST, DELETE etc |
silent |
TRUE/FALSE to be passed to httr call. TRUE by default |
encode |
Default = json, see httr::POST for options |
timeout |
Default = 300, avoid increasing this, preferentially simplify the query first. |
httr response object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.