api_call.R 611 Bytes
Newer Older
Pauline Maury Laribière's avatar
Pauline Maury Laribière committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32



get_codelist <- function() {
  api <- api_class(
    api_type = "codelist", 
    export_format = "SDMX-ML", 
    parameters = "level=1&annotations=true&additionalProp2=string&language=fr",
    id = "CL_NOGA_SECTION"
  )
  api$get_response()
}

get_codelist()



get_one_level <- function() {
  api_call <- api(
    api_type = "nomenclature_one_level", 
    export_format = "CSV", 
    root_url = BASE_URL,
    parameters = "level=1&annotations=true&additionalProp2=string&language=fr",
    id = "HCL_CH_ISCO_19_PROF",
    language = "fr",
  )
  
  api_call$get_url()
  api_call$api_call()
}

get_one_level()