HDXConfig: HDX Configuration

Description Details Public fields Methods Examples

Description

HDX Configuration

HDX Configuration

Details

HDX Configuration allow to connect to an HDX server and setup project where you can interact with the HDX platform

Public fields

data

all info in list.

Methods

Public methods


Method new()

Create a new Configuration object.

Usage
HDXConfig$new(
  hdx_site = "prod",
  hdx_key = NULL,
  hdx_config = NULL,
  hdx_config_file = NULL,
  read_only = TRUE,
  user_agent = NULL
)
Arguments
hdx_site

character the server instance to use

hdx_key

character, the HDX API key

hdx_config

configuration in a list

hdx_config_file

a character value config file. default is the config supplied in the package

read_only

a logical value indicating if you want to just read or be also able to write on the HDX server. You will need a API key to write.

user_agent

a character value, User agent

Returns

A new Configuration object.


Method get_credentials()

Configuration credentials when using a HDX API key

Usage
HDXConfig$get_credentials()
Returns

the username and password associated to the HDX API key


Method set_read_only()

Create or revoke read only status

Usage
HDXConfig$set_read_only(read_only = TRUE)
Arguments
read_only

a logical value indicating if you want to just read or be also able to write on the HDX server. You will need a API key to write.


Method set_hdx_key()

Specify a HDX API key

Usage
HDXConfig$set_hdx_key(hdx_key)
Arguments
hdx_key

a character with key


Method get_hdx_key()

Specify a HDX API key

Usage
HDXConfig$get_hdx_key()
Returns

a character, the HDX API key


Method set_hdx_site()

Specify a HDX server to use

Usage
HDXConfig$set_hdx_site(hdx_site = "prod")
Arguments
hdx_site

a character, the server type to use, prod, test, feature or demo

Returns

a character, the HDX API key


Method get_hdx_site()

Get the HDX server in use

Usage
HDXConfig$get_hdx_site()
Returns

the server type


Method get_hdx_site_url()

Get the HDX server URL in use

Usage
HDXConfig$get_hdx_site_url()
Returns

the server URL


Method remoteclient()

Get the remoteclient currently used

Usage
HDXConfig$remoteclient()
Returns

a crul::HttpClient


Method call_action()

Call the client to the HDX API

Usage
HDXConfig$call_action(action, ..., verb = "get")
Arguments
action

a character

...

parameters for each verb used

verb

a character the verb used, post, get, put or patch

Returns

list a with status code and results


Method read()

read and show Configuration object

Usage
HDXConfig$read()
Returns

Configuration object


Method setup()

Setup Configuration object

Usage
HDXConfig$setup(
  hdx_site = "prod",
  hdx_key = NULL,
  read_only = TRUE,
  hdx_config = NULL,
  configuration = NULL
)
Arguments
hdx_site

a character value, the server

hdx_key

a character value, the API key

read_only

a logical value read only

hdx_config

a list

configuration

a character


Method delete()

Delete a Configuration object Access the global Configuration

Usage
HDXConfig$delete()

Method get_global_config()

Usage
HDXConfig$get_global_config()
Returns

list with HDX configuration information


Method general_statistics()

Get general statistics about the server

Usage
HDXConfig$general_statistics()
Returns

list with statistics about the server


Method as_list()

Convert configuration to list

Usage
HDXConfig$as_list()
Returns

configuration in list format


Method print()

Print Configuration object

Usage
HDXConfig$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
HDXConfig$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

1
2
3
4
5
## Not run: 
set_rhdx_config(hdx_site = "prod")
get_rhd_config()

## End(Not run)

dickoa/rhdx documentation built on Oct. 13, 2021, 8:36 p.m.