brapi_connect: brapi_connect

View source: R/brapi_connect.R

brapi_connectR Documentation

brapi_connect

Description

Create a BrAPI connection object, which contains all parameters to connect to a BrAPI compliant database via internet.

Usage

brapi_connect(
  brapiDb = NULL,
  secure = FALSE,
  protocol = "http://",
  db = "127.0.0.1",
  port = 80,
  apipath = NULL,
  multicrop = FALSE,
  commoncropname = "",
  user = "",
  password = "",
  token = "",
  granttype = "password",
  clientid = "brapirv1",
  bms = FALSE
)

Arguments

brapiDb

list; Connection object for a BrAPI compliant database created by the as.brapi_db() or brapi_db() functions. Default is NULL.

secure

logical; Whether or not a secure connection ("https://") should be used. Default is FALSE, other possible value is TRUE.

protocol

character; Scheme identifying the protocol to be used to access the resource via internet. Default is "http://", other possible value is "https://".

db

character; Host name address of the BrAPI compliant database to be used. Default is "127.0.0.1" (defines localhost).

port

integer; Port number to be used to access a BrAPI compliant database via internet. Default is 80.

apipath

character; Path identifying where the Breeding API has been implemented. Default is "".

multicrop

logical; Whether (TRUE) or not (FALSE) the database is a multicrop system. Default is FALSE, other possible is TRUE.

commoncropname

character; Common crop name to be used, especially when the database is a multicrop system. Default is "".

user

character; Username to be used, when logging in is required. Default is "".

password

character; Password to be used for the specified user, when logging in is required. Default is "".

token

character; Token to be used for authorization, will be passed with every call in the header. Default is ""

granttype

character; Grant type. Default is "password".

clientid

character; Client identification string. Default is "brapir".

bms

logical; Whether (TRUE) of not (FALSE) the database used is from the Breeding Management System (Integrated Breeding Platform). Default is FALSE, other possible value is TRUE.

Details

If the brapiDb argument is used to specify a connection object as created by the as.brapi_db() function or from the white list in the brapi_db() function, it will override the other parameters; except for user, password and token.

Value

An BrAPI compliant database connection object of class brapi_db.

Author(s)

brapir generator package

See Also

Other brapiutils: as.brapi_db(), brapi_canInternet(), brapi_checkCon(), brapi_db(), brapi_imagebreed_login(), brapi_imagebreed_logout(), brapi_login(), brapi_serverinfo_show(), is.brapi_con(), print.brapi_con(), print.brapi_db()


mverouden/brapir documentation built on April 10, 2022, 5:36 p.m.