call {openblender}R Documentation

Make HTTP request to openblender.io services

Description

Call 'OpenBlender' API services.

Usage

call(action, parameters)

Arguments

action

Task you're requesting

parameters

Request options

Value

A list that includes the new dataset id in case you create one, success/error message when you insert observations or the list of observations requested.

See Also

To see more details go to openblender.io

Examples

## Not run: 
#CREATE DATASET
df <- read.csv(file = "/path/to/your/data.csv", header = TRUE, sep = ",")
action <- "API_createDataset"
parameters <- list(
token = "YOUR TOKEN",
id_user = "YOUR USER ID",
name = "Assign a name",
descriptipon = "Set a description",
visibility = "public",
tags = list("topic", "tag"),
insert_observations = "off",# set "on" if you want include the observations
dataframe = df
)
call(action, parameters)
#INSERT OBSERVATIONS
df <- read.csv(file = "/path/to/your/data.csv", header = TRUE, sep = ",")
action <- "API_insertObservations"
parameters <- list(
token = "YOUR TOKEN",
id_user = "YOUR USER ID",
id_dataset = "DATASET ID",
notification = "on",
observations = df
)
call(action, parameters)

#GET OBSERVATIONS
action <- "API_getObservationsFromDataset"
parameters <- list(
token = "YOUR TOKEN",
id_user = "YOUR USER ID",
id_dataset = "DATASET ID"
)
call(action, parameters)

## End(Not run)

[Package openblender version 0.5.81 Index]