Skip to contents

This function establishes a connection to an ODK server with the provided credentials and project/form IDs.

Usage

connect_to_form(server = "https://odk.gedeop.inrae.fr", pid, fid, credential)

Arguments

server

The URL of the ODK server. Defaults to "https://odk.gedeop.inrae.fr".

pid

The project ID on the ODK server.

fid

The form ID on the ODK server.

credential

The path to a file containing the username and password for authentication.

Value

None (function is called for its side effect of establishing a connection to the ODK server).

Details

The function reads the username and password from the specified credential file and uses them to authenticate with the ODK server. It sets the time zone to "Europe/Paris" and enables verbose output for debugging.

Examples

## -----------------------------------------------------------------
## The following examples demonstrate the intended usage.
## They are not executed automatically; remove `\dontrun{}` to run.
## -----------------------------------------------------------------
if (FALSE) { # \dontrun{
# Assume the credentials are stored in "my_cred.txt"
# (first line = username, second line = password)
# connect_to_form(
#   server = "your_server_url",
#   pid = "your_project_id",
#   fid = "your_form_id",
#   credential = "/path/to/credentials.txt"
# )
} # }