get_token: Get a token to access RTE data API

Description Usage Arguments Value Examples

View source: R/rte-api.R

Description

Get a token to access RTE data API

Usage

1
get_token(key, user = NULL, proxy_pwd = NULL)

Arguments

key

a base64 encoded string or a list containing 'client_id' and 'client_secret'. To get those credentials you need an account on https://data.rte-france.com and to create an application for the concerned API.

user

Username (NNI) for proxy if needeed.

proxy_pwd

Password for proxy if needeed.

Value

a list with the access token

Examples

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

# To create a token you can use id_client and id_secret
id_client <- "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
id_secret <- "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
token <- get_token(
  key = list(id_client = id_client, id_secret = id_secret)
)

# or the base64 encoded key
key <- "WFhYWFgtWFhYWFgtWFhYWFgtWFhYWFgtWFhYWFg="
token <- get_token(key)


## End(Not run)

rte-antares-rpackage/antaresWeeklyMargin documentation built on July 25, 2019, 8:23 p.m.