# sunagriAPI
#
# An instance of OpenSILEX WebService
#
# OpenAPI spec version: 3.3.0
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' @title AcquisitionSessions operations
#' @description phisWSClientRTools.AcquisitionSessions
#'
#' @field path Stores url path of the request.
#' @field apiClient Handles the client-server communication.
#' @field userAgent Set the user agent of the request.
#'
#' @importFrom R6 R6Class
#'
#' @section Methods:
#' \describe{
#'
#' get4_p_metadata_file Get the metadata for the acquisition session file
#'
#' }
#'
#' @export
AcquisitionSessionsApi <- R6::R6Class(
'AcquisitionSessionsApi',
public = list(
userAgent = "Swagger-Codegen/3.3.0/r",
apiClient = NULL,
initialize = function(apiClient){
if (!missing(apiClient)) {
self$apiClient <- apiClient
}
else {
self$apiClient <- ApiClient$new()
}
},
get4_p_metadata_file = function(vector_rdf_type,page_size,page,...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToPHISWS")
}
#if (!missing(`authorization`)) {
# headerParams['Authorization'] <- authorization
#}
if (!missing(`vector_rdf_type`)) {
queryParams['vectorRdfType'] <- vector_rdf_type
}
if (!missing(`page_size`)) {
queryParams['pageSize'] <- page_size
}
if (!missing(`page`)) {
queryParams['page'] <- page
}
urlPath <- "/acquisitionSessions/metadataFile"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "GET"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result$data
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- MetadataFileUAVDTO$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$result$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.