Skip to content

Commit c19884b

Browse files
authored
Merge pull request #5 from tonyfujs/https
Make sure all URLs start with https: instead of http:
2 parents 02e1622 + e9d1d34 commit c19884b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

R/connect_mdlib.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
#'
33
#' @param path character: path to send request
44
#' @param query character
5-
#' @param token character: access token to be obtained from \url{http://microdatalib.worldbank.org/index.php/auth/api_keys}
5+
#' @param token character: access token to be obtained from \url{https://microdatalib.worldbank.org/index.php/auth/api_keys}
66
#' @param root character: the root url that hosts the API
77
#'
88
#' @return object of class mdlib_api
99
#' @export
1010
#' @importFrom utils str
1111
#'
1212

13-
connect_mdlib <- function(path, query = NULL, token, root = "http://microdatalib.worldbank.org") {
13+
connect_mdlib <- function(path, query = NULL, token, root = "https://microdatalib.worldbank.org") {
1414
# Build request URL
1515
url <- httr::modify_url(root, path = path, query = query)
1616
# Send request to API
@@ -43,7 +43,7 @@ connect_mdlib <- function(path, query = NULL, token, root = "http://microdatalib
4343

4444

4545
print.mdlib_api <- function(x, ...) {
46-
cat("<http://microdatalibqa.worldbank.org/", x$path, ">\n", sep = "")
46+
cat("<https://microdatalibqa.worldbank.org/", x$path, ">\n", sep = "")
4747
str(x$content)
4848
invisible(x)
4949
}

R/get_public_survey_list.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
get_public_survey_list <- function(token){
1010
out <- connect_mdlib(path = 'index.php/api/catalog/search?ps=10000',
1111
token = token,
12-
root = 'http://microdata.worldbank.org/')
12+
root = 'https://microdata.worldbank.org/')
1313
out <- out$content$result$rows
1414

1515
return(out)

R/get_survey_list.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ get_survey_list <- function(token){
1818

1919
get_number_of_surveys <- function(token) {
2020
# Should be better integrated with the other functions (URL should not be hard coded)
21-
url <- "http://microdatalib.worldbank.org/index.php/api/catalog/search?ps=1"
21+
url <- "https://microdatalib.worldbank.org/index.php/api/catalog/search?ps=1"
2222

2323
resp <- httr::GET(url,
2424
httr::add_headers(.headers = c('X-API-KEY' = token,

man/connect_mdlib.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/getting_started.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ knitr::opts_chunk$set(
2828
### Before you start: Get your API KEY
2929
You can get your API KEY by:
3030

31-
1. Visiting the [following link](http://microdatalibqa.worldbank.org/index.php/auth/api_keys)
31+
1. Visiting the [following link](https://microdatalibqa.worldbank.org/index.php/auth/api_keys)
3232
1. Loging using your World Bank SecureID token
3333
1. Clicking the __create new key__ button.
3434

35-
API documentation can be accessed [here](http://microdatalibqa.worldbank.org/apidocumentation/#api-Metadata-datafile_variables)
35+
API documentation can be accessed [here](https://microdatalibqa.worldbank.org/apidocumentation/#api-Metadata-datafile_variables)
3636

3737
### List all available surveys
3838
```{r}

0 commit comments

Comments
 (0)