Configuration: 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
Configuration$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
Configuration$get_credentials()
Returns

the username and password associated to the HDX API key


Method set_read_only()

Create or revoke read only status

Usage
Configuration$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
Configuration$set_hdx_key(hdx_key)
Arguments
hdx_key

a character with key


Method get_hdx_key()

Specify a HDX API key

Usage
Configuration$get_hdx_key()
Returns

a character, the HDX API key


Method set_hdx_site()

Specify a HDX server to use

Usage
Configuration$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
Configuration$get_hdx_site()
Returns

the server type


Method get_hdx_site_url()

Get the HDX server URL in use

Usage
Configuration$get_hdx_site_url()
Returns

the server URL


Method remoteclient()

Get remoteclient

Usage
Configuration$remoteclient()
Returns

a crul::HttpClient


Method call_action()

Call the client to the HDX API

Usage
Configuration$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()

Show Configuration object

Usage
Configuration$read()
Returns

Configuration object


Method setup()

Setup Configuration object

Usage
Configuration$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 configuration

Usage
Configuration$delete()
Returns

Access global configuration


Method get_global_config()

Usage
Configuration$get_global_config()
Returns

list with info


Method general_statistics()

Get general statistics about the server

Usage
Configuration$general_statistics()
Returns

list with statistics about the server


Method as_list()

Convert configuration to list

Usage
Configuration$as_list()
Returns

configuration in list format


Method print()

Print Configuration object

Usage
Configuration$print()

Method clone()

The objects of this class are cloneable with this method.

Usage
Configuration$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 May 7, 2020, 2 p.m.