really redoc
This commit is contained in:
Родитель
20b9dd1bdb
Коммит
6bcf89c9f1
|
@ -5,7 +5,6 @@
|
|||
#' @param key The subscription key to use to authenticate with the endpoint.
|
||||
#' @param aad_token An Azure Active Directory (AAD) OAuth token, as an alternative to a key for the services that allow AAD authentication.
|
||||
#' @param cognitive_token A Cognitive Service token, as another alternative to a key for the services that accept it.
|
||||
#' @param auth_header The name of the HTTP request header for authentication. Only used if a subscription key is supplied.
|
||||
#' @details
|
||||
#' Currently, `cognitive_endpoint` recognises the following service types:
|
||||
#' - `CognitiveServices`: multiple service types
|
||||
|
@ -73,6 +72,7 @@ print.cognitive_endpoint <- function(x, ...)
|
|||
#' @param encode The encoding (really content-type) for the body. Can be `json` if the body is JSON text, or `raw` for a binary object.
|
||||
#' @param http_verb The HTTP verb for the REST call.
|
||||
#' @param http_status_handler How to handle a failed REST call. `stop`, `warn` and `message` will call the corresponding `*_for_status` handler in the httr package; `pass` will return the raw response object unchanged. The last one is mostly intended for debugging purposes.
|
||||
#' @param auth_header The name of the HTTP request header for authentication. Only used if a subscription key is supplied.
|
||||
#' @details
|
||||
#' This function does the low-level work of constructing a HTTP request and then calling the REST endpoint. It is meant to be used by other packages that provide higher-level views of the service functionality.
|
||||
#'
|
||||
|
|
|
@ -26,6 +26,8 @@ call_cognitive_endpoint(endpoint, operation, options = list(),
|
|||
\item{http_verb}{The HTTP verb for the REST call.}
|
||||
|
||||
\item{http_status_handler}{How to handle a failed REST call. \code{stop}, \code{warn} and \code{message} will call the corresponding \code{*_for_status} handler in the httr package; \code{pass} will return the raw response object unchanged. The last one is mostly intended for debugging purposes.}
|
||||
|
||||
\item{auth_header}{The name of the HTTP request header for authentication. Only used if a subscription key is supplied.}
|
||||
}
|
||||
\value{
|
||||
For a successful REST call, the contents of the response. This will usually be a list, obtained by translating the raw JSON body into R. If the call returns a non-success HTTP status code, based on the \code{http_status_handler} argument.
|
||||
|
|
|
@ -17,8 +17,6 @@ cognitive_endpoint(url, service_type, key = NULL, aad_token = NULL,
|
|||
\item{aad_token}{An Azure Active Directory (AAD) OAuth token, as an alternative to a key for the services that allow AAD authentication.}
|
||||
|
||||
\item{cognitive_token}{A Cognitive Service token, as another alternative to a key for the services that accept it.}
|
||||
|
||||
\item{auth_header}{The name of the HTTP request header for authentication. Only used if a subscription key is supplied.}
|
||||
}
|
||||
\value{
|
||||
An object of from class \code{cognitive_endpoint}, that can be used to communicate with the REST endpoint.
|
||||
|
|
Загрузка…
Ссылка в новой задаче