#' Synapse REST API
#'
#' No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
#'
#' The version of the OpenAPI document: v1
#' Generated by: https://openapi-generator.tech
#'
#' @docType class
#' @title AuthenticationServices operations
#' @description AuthenticationServicesApi
#' @format An \code{R6Class} generator object
#' @field api_client Handles the client-server communication.
#'
#' @section Methods:
#' \describe{
#' \strong{ DeleteAuthV1Oauth2Alias } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } provider character
#' \item \emph{ @param } alias character
#'
#'
#' \item status code : 200 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ DeleteAuthV1PersonalAccessTokenId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id numeric
#'
#'
#' \item status code : 200 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ DeleteAuthV1SecretKey } \emph{ }
#'
#' \itemize{
#'
#'
#' \item status code : 204 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetAuthV1AuthenticatedOn } \emph{ }
#'
#' \itemize{
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthAuthenticatedOn} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthAuthenticatedOn
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetAuthV1PersonalAccessToken } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } next_page_token character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthAccessTokenRecordList} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthAccessTokenRecordList
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetAuthV1PersonalAccessTokenId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id numeric
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthAccessTokenRecord} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthAccessTokenRecord
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetAuthV1SecretKey } \emph{ }
#'
#' \itemize{
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthSecretKey} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthSecretKey
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1Login2 } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_auth_login_request \link{OrgSagebionetworksRepoModelAuthLoginRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthLoginResponse} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthLoginResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1Oauth2Account2 } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request \link{OrgSagebionetworksRepoModelOauthOAuthAccountCreationRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthLoginResponse} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthLoginResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1Oauth2Alias } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_oauth_o_auth_validation_request \link{OrgSagebionetworksRepoModelOauthOAuthValidationRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelPrincipalPrincipalAlias} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelPrincipalPrincipalAlias
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1Oauth2Authurl } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_oauth_o_auth_url_request \link{OrgSagebionetworksRepoModelOauthOAuthUrlRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelOauthOAuthUrlResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelOauthOAuthUrlResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1Oauth2Session2 } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_oauth_o_auth_validation_request \link{OrgSagebionetworksRepoModelOauthOAuthValidationRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthLoginResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthLoginResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1PersonalAccessToken } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_auth_access_token_generation_request \link{OrgSagebionetworksRepoModelAuthAccessTokenGenerationRequest}
#' \item \emph{ @param } synapse_authorization character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAuthAccessTokenGenerationResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAuthAccessTokenGenerationResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1TermsOfUse2 } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_auth_access_token \link{OrgSagebionetworksRepoModelAuthAccessToken}
#'
#'
#' \item status code : 204 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1UserChangePassword } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_auth_change_password_interface \link{OrgSagebionetworksRepoModelAuthChangePasswordInterface}
#'
#'
#' \item status code : 204 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostAuthV1UserPasswordReset } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } password_reset_endpoint character
#' \item \emph{ @param } org_sagebionetworks_repo_model_auth_username \link{OrgSagebionetworksRepoModelAuthUsername}
#'
#'
#' \item status code : 204 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' }
#'
#'
#' @examples
#' \dontrun{
#' #################### DeleteAuthV1Oauth2Alias ####################
#'
#' library(synclient)
#' var_provider <- "provider_example" # character | the OAuth provider through which the alias was associated
#' var_alias <- "alias_example" # character | the alias for the user given by the provider
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteAuthV1Oauth2Alias(var_provider, var_alias)
#'
#'
#' #################### DeleteAuthV1PersonalAccessTokenId ####################
#'
#' library(synclient)
#' var_id <- 3.4 # numeric | The unique ID of the token, which is the unique ID (the \"jti\" claim) contained in the JWT
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteAuthV1PersonalAccessTokenId(var_id)
#'
#'
#' #################### DeleteAuthV1SecretKey ####################
#'
#' library(synclient)
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteAuthV1SecretKey()
#'
#'
#' #################### GetAuthV1AuthenticatedOn ####################
#'
#' library(synclient)
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$GetAuthV1AuthenticatedOn(data_file = "result.txt")
#' result <- api_instance$GetAuthV1AuthenticatedOn()
#' dput(result)
#'
#'
#' #################### GetAuthV1PersonalAccessToken ####################
#'
#' library(synclient)
#' var_next_page_token <- "next_page_token_example" # character | (Optional)
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$GetAuthV1PersonalAccessToken(next_page_token = var_next_page_tokendata_file = "result.txt")
#' result <- api_instance$GetAuthV1PersonalAccessToken(next_page_token = var_next_page_token)
#' dput(result)
#'
#'
#' #################### GetAuthV1PersonalAccessTokenId ####################
#'
#' library(synclient)
#' var_id <- 3.4 # numeric | The unique ID of the token, which is the unique ID (the \"jti\" claim) contained in the JWT
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$GetAuthV1PersonalAccessTokenId(var_iddata_file = "result.txt")
#' result <- api_instance$GetAuthV1PersonalAccessTokenId(var_id)
#' dput(result)
#'
#'
#' #################### GetAuthV1SecretKey ####################
#'
#' library(synclient)
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$GetAuthV1SecretKey(data_file = "result.txt")
#' result <- api_instance$GetAuthV1SecretKey()
#' dput(result)
#'
#'
#' #################### PostAuthV1Login2 ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_auth_login_request <- org.sagebionetworks.repo.model.auth.LoginRequest$new("username_example", "password_example", "authenticationReceipt_example") # OrgSagebionetworksRepoModelAuthLoginRequest |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostAuthV1Login2(var_org_sagebionetworks_repo_model_auth_login_requestdata_file = "result.txt")
#' result <- api_instance$PostAuthV1Login2(var_org_sagebionetworks_repo_model_auth_login_request)
#' dput(result)
#'
#'
#' #################### PostAuthV1Oauth2Account2 ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request <- org.sagebionetworks.repo.model.oauth.OAuthAccountCreationRequest$new("provider_example", "authenticationCode_example", "redirectUrl_example", "userName_example") # OrgSagebionetworksRepoModelOauthOAuthAccountCreationRequest |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostAuthV1Oauth2Account2(var_org_sagebionetworks_repo_model_oauth_o_auth_account_creation_requestdata_file = "result.txt")
#' result <- api_instance$PostAuthV1Oauth2Account2(var_org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request)
#' dput(result)
#'
#'
#' #################### PostAuthV1Oauth2Alias ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_oauth_o_auth_validation_request <- org.sagebionetworks.repo.model.oauth.OAuthValidationRequest$new("provider_example", "authenticationCode_example", "redirectUrl_example") # OrgSagebionetworksRepoModelOauthOAuthValidationRequest |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostAuthV1Oauth2Alias(var_org_sagebionetworks_repo_model_oauth_o_auth_validation_requestdata_file = "result.txt")
#' result <- api_instance$PostAuthV1Oauth2Alias(var_org_sagebionetworks_repo_model_oauth_o_auth_validation_request)
#' dput(result)
#'
#'
#' #################### PostAuthV1Oauth2Authurl ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_oauth_o_auth_url_request <- org.sagebionetworks.repo.model.oauth.OAuthUrlRequest$new("provider_example", "redirectUrl_example", "state_example") # OrgSagebionetworksRepoModelOauthOAuthUrlRequest |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostAuthV1Oauth2Authurl(var_org_sagebionetworks_repo_model_oauth_o_auth_url_requestdata_file = "result.txt")
#' result <- api_instance$PostAuthV1Oauth2Authurl(var_org_sagebionetworks_repo_model_oauth_o_auth_url_request)
#' dput(result)
#'
#'
#' #################### PostAuthV1Oauth2Session2 ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_oauth_o_auth_validation_request <- org.sagebionetworks.repo.model.oauth.OAuthValidationRequest$new("provider_example", "authenticationCode_example", "redirectUrl_example") # OrgSagebionetworksRepoModelOauthOAuthValidationRequest |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostAuthV1Oauth2Session2(var_org_sagebionetworks_repo_model_oauth_o_auth_validation_requestdata_file = "result.txt")
#' result <- api_instance$PostAuthV1Oauth2Session2(var_org_sagebionetworks_repo_model_oauth_o_auth_validation_request)
#' dput(result)
#'
#'
#' #################### PostAuthV1PersonalAccessToken ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_auth_access_token_generation_request <- org.sagebionetworks.repo.model.auth.AccessTokenGenerationRequest$new(c("scope_example"), c(key = org.sagebionetworks.repo.model.oauth.OIDCClaimsRequestDetails$new("essential_example", "value_example", c("values_example"))), "name_example") # OrgSagebionetworksRepoModelAuthAccessTokenGenerationRequest |
#' var_synapse_authorization <- "synapse_authorization_example" # character | (Optional)
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostAuthV1PersonalAccessToken(var_org_sagebionetworks_repo_model_auth_access_token_generation_request, synapse_authorization = var_synapse_authorizationdata_file = "result.txt")
#' result <- api_instance$PostAuthV1PersonalAccessToken(var_org_sagebionetworks_repo_model_auth_access_token_generation_request, synapse_authorization = var_synapse_authorization)
#' dput(result)
#'
#'
#' #################### PostAuthV1TermsOfUse2 ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_auth_access_token <- org.sagebionetworks.repo.model.auth.AccessToken$new("accessToken_example") # OrgSagebionetworksRepoModelAuthAccessToken |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' api_instance$PostAuthV1TermsOfUse2(var_org_sagebionetworks_repo_model_auth_access_token)
#'
#'
#' #################### PostAuthV1UserChangePassword ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_auth_change_password_interface <- org.sagebionetworks.repo.model.auth.ChangePasswordInterface$new("newPassword_example", "concreteType_example", org.sagebionetworks.repo.model.auth.PasswordResetSignedToken$new("concreteType_example", "hmac_example", 123, "expiresOn_example", "createdOn_example", "userId_example", "validity_example"), "username_example", "currentPassword_example", "authenticationReceipt_example") # OrgSagebionetworksRepoModelAuthChangePasswordInterface |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' api_instance$PostAuthV1UserChangePassword(var_org_sagebionetworks_repo_model_auth_change_password_interface)
#'
#'
#' #################### PostAuthV1UserPasswordReset ####################
#'
#' library(synclient)
#' var_password_reset_endpoint <- "password_reset_endpoint_example" # character | the Portal's url prefix for handling password resets.
#' var_org_sagebionetworks_repo_model_auth_username <- org.sagebionetworks.repo.model.auth.Username$new("email_example") # OrgSagebionetworksRepoModelAuthUsername |
#'
#' api_instance <- AuthenticationServicesApi$new()
#'
#' api_instance$PostAuthV1UserPasswordReset(var_password_reset_endpoint, var_org_sagebionetworks_repo_model_auth_username)
#'
#'
#' }
#' @importFrom R6 R6Class
#' @importFrom base64enc base64encode
#' @export
AuthenticationServicesApi <- R6::R6Class(
"AuthenticationServicesApi",
public = list(
api_client = NULL,
#' Initialize a new AuthenticationServicesApi.
#'
#' @description
#' Initialize a new AuthenticationServicesApi.
#'
#' @param api_client An instance of API client.
#' @export
initialize = function(api_client) {
if (!missing(api_client)) {
self$api_client <- api_client
} else {
self$api_client <- ApiClient$new()
}
},
#'
#'
#' @description
#'
#'
#' @param provider the OAuth provider through which the alias was associated
#' @param alias the alias for the user given by the provider
#' @param ... Other optional arguments
#' @return void
#' @export
DeleteAuthV1Oauth2Alias = function(provider, alias, ...) {
local_var_response <- self$DeleteAuthV1Oauth2AliasWithHttpInfo(provider, alias, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param provider the OAuth provider through which the alias was associated
#' @param alias the alias for the user given by the provider
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteAuthV1Oauth2AliasWithHttpInfo = function(provider, alias, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`provider`)) {
stop("Missing required parameter `provider`.")
}
if (missing(`alias`)) {
stop("Missing required parameter `alias`.")
}
query_params[["provider"]] <- `provider`
query_params[["alias"]] <- `alias`
local_var_url_path <- "/auth/v1/oauth2/alias"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list()
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "DELETE",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
local_var_resp$content <- NULL
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param id The unique ID of the token, which is the unique ID (the \"jti\" claim) contained in the JWT
#' @param ... Other optional arguments
#' @return void
#' @export
DeleteAuthV1PersonalAccessTokenId = function(id, ...) {
local_var_response <- self$DeleteAuthV1PersonalAccessTokenIdWithHttpInfo(id, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param id The unique ID of the token, which is the unique ID (the \"jti\" claim) contained in the JWT
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteAuthV1PersonalAccessTokenIdWithHttpInfo = function(id, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
local_var_url_path <- "/auth/v1/personalAccessToken/{id}"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list()
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "DELETE",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
local_var_resp$content <- NULL
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param ... Other optional arguments
#' @return void
#' @export
DeleteAuthV1SecretKey = function(...) {
local_var_response <- self$DeleteAuthV1SecretKeyWithHttpInfo(...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteAuthV1SecretKeyWithHttpInfo = function(...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
local_var_url_path <- "/auth/v1/secretKey"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list()
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "DELETE",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
local_var_resp$content <- NULL
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthAuthenticatedOn
#' @export
GetAuthV1AuthenticatedOn = function(data_file = NULL, ...) {
local_var_response <- self$GetAuthV1AuthenticatedOnWithHttpInfo(data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthAuthenticatedOn) with additional information such as HTTP status code, headers
#' @export
GetAuthV1AuthenticatedOnWithHttpInfo = function(data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
local_var_url_path <- "/auth/v1/authenticatedOn"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthAuthenticatedOn", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param next_page_token (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthAccessTokenRecordList
#' @export
GetAuthV1PersonalAccessToken = function(next_page_token = NULL, data_file = NULL, ...) {
local_var_response <- self$GetAuthV1PersonalAccessTokenWithHttpInfo(next_page_token, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param next_page_token (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthAccessTokenRecordList) with additional information such as HTTP status code, headers
#' @export
GetAuthV1PersonalAccessTokenWithHttpInfo = function(next_page_token = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["nextPageToken"]] <- `next_page_token`
local_var_url_path <- "/auth/v1/personalAccessToken"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthAccessTokenRecordList", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param id The unique ID of the token, which is the unique ID (the \"jti\" claim) contained in the JWT
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthAccessTokenRecord
#' @export
GetAuthV1PersonalAccessTokenId = function(id, data_file = NULL, ...) {
local_var_response <- self$GetAuthV1PersonalAccessTokenIdWithHttpInfo(id, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param id The unique ID of the token, which is the unique ID (the \"jti\" claim) contained in the JWT
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthAccessTokenRecord) with additional information such as HTTP status code, headers
#' @export
GetAuthV1PersonalAccessTokenIdWithHttpInfo = function(id, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
local_var_url_path <- "/auth/v1/personalAccessToken/{id}"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthAccessTokenRecord", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthSecretKey
#' @export
GetAuthV1SecretKey = function(data_file = NULL, ...) {
local_var_response <- self$GetAuthV1SecretKeyWithHttpInfo(data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthSecretKey) with additional information such as HTTP status code, headers
#' @export
GetAuthV1SecretKeyWithHttpInfo = function(data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
local_var_url_path <- "/auth/v1/secretKey"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthSecretKey", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_login_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthLoginResponse
#' @export
PostAuthV1Login2 = function(org_sagebionetworks_repo_model_auth_login_request, data_file = NULL, ...) {
local_var_response <- self$PostAuthV1Login2WithHttpInfo(org_sagebionetworks_repo_model_auth_login_request, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_login_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthLoginResponse) with additional information such as HTTP status code, headers
#' @export
PostAuthV1Login2WithHttpInfo = function(org_sagebionetworks_repo_model_auth_login_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_auth_login_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_auth_login_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_auth_login_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_auth_login_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/login2"
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthLoginResponse", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthLoginResponse
#' @export
PostAuthV1Oauth2Account2 = function(org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request, data_file = NULL, ...) {
local_var_response <- self$PostAuthV1Oauth2Account2WithHttpInfo(org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthLoginResponse) with additional information such as HTTP status code, headers
#' @export
PostAuthV1Oauth2Account2WithHttpInfo = function(org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_oauth_o_auth_account_creation_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/oauth2/account2"
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthLoginResponse", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_validation_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelPrincipalPrincipalAlias
#' @export
PostAuthV1Oauth2Alias = function(org_sagebionetworks_repo_model_oauth_o_auth_validation_request, data_file = NULL, ...) {
local_var_response <- self$PostAuthV1Oauth2AliasWithHttpInfo(org_sagebionetworks_repo_model_oauth_o_auth_validation_request, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_validation_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelPrincipalPrincipalAlias) with additional information such as HTTP status code, headers
#' @export
PostAuthV1Oauth2AliasWithHttpInfo = function(org_sagebionetworks_repo_model_oauth_o_auth_validation_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_oauth_o_auth_validation_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_oauth_o_auth_validation_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_oauth_o_auth_validation_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_oauth_o_auth_validation_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/oauth2/alias"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelPrincipalPrincipalAlias", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_url_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelOauthOAuthUrlResponse
#' @export
PostAuthV1Oauth2Authurl = function(org_sagebionetworks_repo_model_oauth_o_auth_url_request, data_file = NULL, ...) {
local_var_response <- self$PostAuthV1Oauth2AuthurlWithHttpInfo(org_sagebionetworks_repo_model_oauth_o_auth_url_request, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_url_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelOauthOAuthUrlResponse) with additional information such as HTTP status code, headers
#' @export
PostAuthV1Oauth2AuthurlWithHttpInfo = function(org_sagebionetworks_repo_model_oauth_o_auth_url_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_oauth_o_auth_url_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_oauth_o_auth_url_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_oauth_o_auth_url_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_oauth_o_auth_url_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/oauth2/authurl"
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelOauthOAuthUrlResponse", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_validation_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthLoginResponse
#' @export
PostAuthV1Oauth2Session2 = function(org_sagebionetworks_repo_model_oauth_o_auth_validation_request, data_file = NULL, ...) {
local_var_response <- self$PostAuthV1Oauth2Session2WithHttpInfo(org_sagebionetworks_repo_model_oauth_o_auth_validation_request, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_oauth_o_auth_validation_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthLoginResponse) with additional information such as HTTP status code, headers
#' @export
PostAuthV1Oauth2Session2WithHttpInfo = function(org_sagebionetworks_repo_model_oauth_o_auth_validation_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_oauth_o_auth_validation_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_oauth_o_auth_validation_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_oauth_o_auth_validation_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_oauth_o_auth_validation_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/oauth2/session2"
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthLoginResponse", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_access_token_generation_request
#' @param synapse_authorization (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAuthAccessTokenGenerationResponse
#' @export
PostAuthV1PersonalAccessToken = function(org_sagebionetworks_repo_model_auth_access_token_generation_request, synapse_authorization = NULL, data_file = NULL, ...) {
local_var_response <- self$PostAuthV1PersonalAccessTokenWithHttpInfo(org_sagebionetworks_repo_model_auth_access_token_generation_request, synapse_authorization, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_access_token_generation_request
#' @param synapse_authorization (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAuthAccessTokenGenerationResponse) with additional information such as HTTP status code, headers
#' @export
PostAuthV1PersonalAccessTokenWithHttpInfo = function(org_sagebionetworks_repo_model_auth_access_token_generation_request, synapse_authorization = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_auth_access_token_generation_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_auth_access_token_generation_request`.")
}
header_params["Synapse-Authorization"] <- `synapse_authorization`
if (!is.null(`org_sagebionetworks_repo_model_auth_access_token_generation_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_auth_access_token_generation_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/personalAccessToken"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAuthAccessTokenGenerationResponse", loadNamespace("synclient")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_access_token
#' @param ... Other optional arguments
#' @return void
#' @export
PostAuthV1TermsOfUse2 = function(org_sagebionetworks_repo_model_auth_access_token, ...) {
local_var_response <- self$PostAuthV1TermsOfUse2WithHttpInfo(org_sagebionetworks_repo_model_auth_access_token, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_access_token
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
PostAuthV1TermsOfUse2WithHttpInfo = function(org_sagebionetworks_repo_model_auth_access_token, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_auth_access_token`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_auth_access_token`.")
}
if (!is.null(`org_sagebionetworks_repo_model_auth_access_token`)) {
local_var_body <- `org_sagebionetworks_repo_model_auth_access_token`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/termsOfUse2"
# The Accept request HTTP header
local_var_accepts <- list()
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
local_var_resp$content <- NULL
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_change_password_interface
#' @param ... Other optional arguments
#' @return void
#' @export
PostAuthV1UserChangePassword = function(org_sagebionetworks_repo_model_auth_change_password_interface, ...) {
local_var_response <- self$PostAuthV1UserChangePasswordWithHttpInfo(org_sagebionetworks_repo_model_auth_change_password_interface, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_auth_change_password_interface
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
PostAuthV1UserChangePasswordWithHttpInfo = function(org_sagebionetworks_repo_model_auth_change_password_interface, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_auth_change_password_interface`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_auth_change_password_interface`.")
}
if (!is.null(`org_sagebionetworks_repo_model_auth_change_password_interface`)) {
local_var_body <- `org_sagebionetworks_repo_model_auth_change_password_interface`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/user/changePassword"
# The Accept request HTTP header
local_var_accepts <- list()
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
local_var_resp$content <- NULL
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#'
#'
#' @description
#'
#'
#' @param password_reset_endpoint the Portal's url prefix for handling password resets.
#' @param org_sagebionetworks_repo_model_auth_username
#' @param ... Other optional arguments
#' @return void
#' @export
PostAuthV1UserPasswordReset = function(password_reset_endpoint, org_sagebionetworks_repo_model_auth_username, ...) {
local_var_response <- self$PostAuthV1UserPasswordResetWithHttpInfo(password_reset_endpoint, org_sagebionetworks_repo_model_auth_username, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#'
#'
#' @description
#'
#'
#' @param password_reset_endpoint the Portal's url prefix for handling password resets.
#' @param org_sagebionetworks_repo_model_auth_username
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
PostAuthV1UserPasswordResetWithHttpInfo = function(password_reset_endpoint, org_sagebionetworks_repo_model_auth_username, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`password_reset_endpoint`)) {
stop("Missing required parameter `password_reset_endpoint`.")
}
if (missing(`org_sagebionetworks_repo_model_auth_username`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_auth_username`.")
}
query_params[["passwordResetEndpoint"]] <- `password_reset_endpoint`
if (!is.null(`org_sagebionetworks_repo_model_auth_username`)) {
local_var_body <- `org_sagebionetworks_repo_model_auth_username`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/auth/v1/user/password/reset"
# The Accept request HTTP header
local_var_accepts <- list()
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
local_var_resp$content <- NULL
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.