An instance of OpenSILEX WebService
This API client was generated by the swagger-codegen project. By using the OpenAPI/Swagger spec from a remote server, you can easily generate an API client.
- API version: 3.3.0
- Package version: 3.3.0
- Build package: io.swagger.codegen.languages.RClientCodegen
You'll need the devtools
package in order to build the API.
Make sure you have a proper CRAN repository from which you can download packages.
Install the devtools
package with the following command.
if(!require(devtools)) { install.packages("devtools") }
Make sure you set the working directory to where the API code is located. Then execute
library(devtools)
install(".")
library(phisWSClientRTools)
# Le chargement a nécessité le package : opensilexWSClientR
phisWSClientRTools::connectToPHISWS(apiID="ws_private",username="[email protected]",password="guest", url = "http://138.102.159.36:8080/sunagriAPI/rest/")
# 2019-10-04 10:05:40 INFO::Query executed and data recovered - WS2
annoService <- AnnotationsApi$new()
# create Annotations
newAnnotation <- AnnotationDTO$new()
newAnnotation$creator <- "http://www.phenome-fppn.fr/mtp/id/agent/admin_opensilex"
newAnnotation$targets <- list("http://www.phenome-fppn.fr/test/id/event/99fe49a7-37e0-4b98-978e-132288172d35")
newAnnotation$motivatedBy <- "http://www.w3.org/ns/oa#describing"
newAnnotation$bodyValues <- list("test2")
newAnnotation2 <- newAnnotation$clone()
annoService$post1(body=list(newAnnotation2,newAnnotation))
# search Annotations
annot <- annoService$get_annotations_by_search()
# <Response>
# Public:
# clone: function (deep = FALSE)
# content: list()
# initialize: function (content, response)
# response: response
# wsResponse: list, WSResponse
annot$content
# <AnnotationDTO>
# Public:
# bodyValues: list
# clone: function (deep = FALSE)
# creationDate: 2019-03-13T14:39:35+01:00
# creator: http://www.phenome-fppn.fr/mtp/id/agent/alain_charcosset
# fromJSON: function (AnnotationDTOJson)
# fromJSONObject: function (AnnotationDTOObject)
# fromJSONString: function (AnnotationDTOJson)
# initialize: function (creator, motivatedBy, bodyValues, targets, uri, creationDate)
# motivatedBy: http://www.w3.org/ns/oa#describing
# targets: list
# toJSON: function ()
# toJSONString: function ()
# uri: http://www.phenome-fppn.fr/test/id/annotation/eb37c158-5 ...