#' 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 DockerCommitServices operations
#' @description DockerCommitServicesApi
#' @format An \code{R6Class} generator object
#' @field api_client Handles the client-server communication.
#'
#' @section Methods:
#' \describe{
#' \strong{ GetRepoV1EntityIdDockerTag } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @param } sort character
#' \item \emph{ @param } ascending character
#' \item \emph{ @param } limit numeric
#' \item \emph{ @param } offset numeric
#' \item \emph{ @returnType } \link{PaginatedResultsOfDockerCommit} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : PaginatedResultsOfDockerCommit
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1EntityIdDockerCommit } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @param } org_sagebionetworks_repo_model_docker_docker_commit \link{OrgSagebionetworksRepoModelDockerDockerCommit}
#'
#'
#' \item status code : 204 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' }
#'
#'
#' @examples
#' \dontrun{
#' #################### GetRepoV1EntityIdDockerTag ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character |
#' var_sort <- "sort_example" # character | (Optional)
#' var_ascending <- "ascending_example" # character | , optional (default is false) (Optional)
#' var_limit <- 3.4 # numeric | pagination parameter, optional (default is 20) (Optional)
#' var_offset <- 3.4 # numeric | pagination parameter, optional (default is 0) (Optional)
#'
#' api_instance <- DockerCommitServicesApi$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$GetRepoV1EntityIdDockerTag(var_id, sort = var_sort, ascending = var_ascending, limit = var_limit, offset = var_offsetdata_file = "result.txt")
#' result <- api_instance$GetRepoV1EntityIdDockerTag(var_id, sort = var_sort, ascending = var_ascending, limit = var_limit, offset = var_offset)
#' dput(result)
#'
#'
#' #################### PostRepoV1EntityIdDockerCommit ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character |
#' var_org_sagebionetworks_repo_model_docker_docker_commit <- org.sagebionetworks.repo.model.docker.DockerCommit$new("tag_example", "digest_example", "createdOn_example") # OrgSagebionetworksRepoModelDockerDockerCommit |
#'
#' api_instance <- DockerCommitServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$PostRepoV1EntityIdDockerCommit(var_id, var_org_sagebionetworks_repo_model_docker_docker_commit)
#'
#'
#' }
#' @importFrom R6 R6Class
#' @importFrom base64enc base64encode
#' @export
DockerCommitServicesApi <- R6::R6Class(
"DockerCommitServicesApi",
public = list(
api_client = NULL,
#' Initialize a new DockerCommitServicesApi.
#'
#' @description
#' Initialize a new DockerCommitServicesApi.
#'
#' @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 id
#' @param sort (optional) No description
#' @param ascending (optional) , optional (default is false)
#' @param limit (optional) pagination parameter, optional (default is 20)
#' @param offset (optional) pagination parameter, optional (default is 0)
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return PaginatedResultsOfDockerCommit
#' @export
GetRepoV1EntityIdDockerTag = function(id, sort = NULL, ascending = NULL, limit = NULL, offset = NULL, data_file = NULL, ...) {
local_var_response <- self$GetRepoV1EntityIdDockerTagWithHttpInfo(id, sort, ascending, limit, offset, 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
#' @param sort (optional) No description
#' @param ascending (optional) , optional (default is false)
#' @param limit (optional) pagination parameter, optional (default is 20)
#' @param offset (optional) pagination parameter, optional (default is 0)
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (PaginatedResultsOfDockerCommit) with additional information such as HTTP status code, headers
#' @export
GetRepoV1EntityIdDockerTagWithHttpInfo = function(id, sort = NULL, ascending = NULL, limit = NULL, offset = 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(`id`)) {
stop("Missing required parameter `id`.")
}
query_params[["sort"]] <- `sort`
query_params[["ascending"]] <- `ascending`
query_params[["limit"]] <- `limit`
query_params[["offset"]] <- `offset`
local_var_url_path <- "/repo/v1/entity/{id}/dockerTag"
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(), "PaginatedResultsOfDockerCommit", 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
#' @param org_sagebionetworks_repo_model_docker_docker_commit
#' @param ... Other optional arguments
#' @return void
#' @export
PostRepoV1EntityIdDockerCommit = function(id, org_sagebionetworks_repo_model_docker_docker_commit, ...) {
local_var_response <- self$PostRepoV1EntityIdDockerCommitWithHttpInfo(id, org_sagebionetworks_repo_model_docker_docker_commit, ...)
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
#' @param org_sagebionetworks_repo_model_docker_docker_commit
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
PostRepoV1EntityIdDockerCommitWithHttpInfo = function(id, org_sagebionetworks_repo_model_docker_docker_commit, ...) {
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`.")
}
if (missing(`org_sagebionetworks_repo_model_docker_docker_commit`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_docker_docker_commit`.")
}
if (!is.null(`org_sagebionetworks_repo_model_docker_docker_commit`)) {
local_var_body <- `org_sagebionetworks_repo_model_docker_docker_commit`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/entity/{id}/dockerCommit"
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("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.