save_configuration: Save minid configuration object to config file

Description Usage Arguments Details Examples

View source: R/minidtools.R

Description

Before using the minid API to mint a new minid, you first need to validate your email address (using register_user()). Following registration, a unique code will be sent to your email address. You must present this code along with your email address when accessing the API.

Usage

1
2
save_configuration(config, config_path = "~/.minid/minid-config.json",
  python_style = FALSE, overwrite = FALSE)

Arguments

config

an object of type configuration

config_path

Path to the configuration file (default "~/.minid/minid-config.json")

python_style

write python-style config file (default FALSE)

overwrite

overwrite existing configuration file? (default FALSE)

Details

As a convenience you can specify this information in a minid configuration file (default location is ~/.minid/minid-config.json). This configuration file can be either JSON (default) or the format descrived for the python minid client package https://github.com/fair-research/minid.

save_configuration(config) saves the configuration object config as a json- or python-style config file at ~/.minid/minid-config.json.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

config <- configuration(
   server = "http://minid.bd2k.org/minid/",
   user = "Jane Smith",
   email = "jsmith@example.com",
   orcid = "0000-0003-2898-9044",
   code = "XXXX-XXX-XXXXX-XXXX-XXXX"
 )

  save_configuration(config, config_path = "~/.minid/minid-config.json")

## End(Not run)

bheavner/minid documentation built on Aug. 1, 2020, 9:38 p.m.