Skip to content

chabrault/opensilexClientToolsR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R API client for opensilexClientToolsR

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

Overview

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: 1.0.0-rc+2
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RClientCodegen

Installation from github

To install the opensilexClientToolsR package, the easiest is to install it directly from Github. Open an R session and run the following commands:

library(remotes)
install_github("OpenSILEX/opensilexClientToolsR",  ref="1.0.0-rc+2")

Build Prerequisites

You'll need the devtools package in order to build the API. Install the devtools package with the following command.

if(!require(devtools)) { install.packages("devtools") }

Installation of the API package

Make sure you set the working directory to where the API code is located. Then execute

library(devtools)
install(".")

Author

Usage

library(opensilexClientToolsR)
# Le chargement a nécessité le package : opensilexWSClientR

# Make sure to change the url to point to your instance (and don't forget to add "/rest" at the end)
# The identifier and password should be the ones of an existing account on that instance
opensilexClientToolsR::connectToOpenSILEX(identifier="[email protected]",password="guest", url = "https://localhost/rest")
# 2019-10-04 10:05:40 INFO::Query executed and data recovered - WS2
annoService <- AnnotationsApi$new()
# create Annotations
newAnnotation <- AnnotationCreationDTO$new(
    description="Your annotation body",
    targets=list("test:set/scientific-objects/so-test-gabriel"),
    motivation="http://www.w3.org/ns/oa#assessing"
)
new_annot <- annoService$create_annotation(body = newAnnotation)
# 2021-10-19 09:38:52 INFO::Query executed and data recovered
new_annot
# <Response>
#   Public:
#     clone: function (deep = FALSE) 
#     data: http://www.phenome-fppn.fr/set/annotations#613fbb37-9aff ...
#     initialize: function (metadata, data, response, success) 
#     metadata: list
#     response: response
#     success: TRUE

# search Annotations
annot <- annoService$search_annotations()
# 2021-10-19 09:39:09 INFO::Query executed and data recovered

annot
# <Response>
#   Public:
#     clone: function (deep = FALSE) 
#     data: list
#     initialize: function (metadata, data, response, success) 
#     metadata: list
#     response: response
#     success: TRUE

About

Auxiliary package used by OpenSILEX Client R

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 100.0%