diff --git a/.gitignore b/.gitignore index 3734a3c2..1d693811 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ Icon .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent +.Rprofile # Directories potentially created on remote AFP share .AppleDB diff --git a/DESCRIPTION b/DESCRIPTION index f0210b0b..f924283e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: datimutils Type: Package Title: Utilities for interacting with the DATIM api from R -Version: 0.1.3 -Date: 2022-02-04 +Version: 0.2.0 +Date: 2022-03-08 Authors@R: c( person("Scott", "Jackson", email = "sjackson@baosystems.com", @@ -46,5 +46,5 @@ Suggests: License: GPL-3 + file LICENSE Encoding: UTF-8 LazyData: true -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 VignetteBuilder: knitr diff --git a/NAMESPACE b/NAMESPACE index eec892e8..cea01cfc 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -41,6 +41,8 @@ export(getIndicatorGroupSets) export(getIndicatorGroups) export(getIndicators) export(getMetadata) +export(getMyStreams) +export(getMyUserType) export(getOptionGroupSets) export(getOptionGroups) export(getOptionSets) @@ -48,7 +50,10 @@ export(getOptions) export(getOrgUnitGroupSets) export(getOrgUnitGroups) export(getOrgUnits) +export(getUserGroups) +export(listMechs) export(loginToDATIM) export(make_dim) export(make_fil) export(metadataFilter) +importFrom(magrittr,"%>%") diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 00000000..819c1bca --- /dev/null +++ b/NEWS.md @@ -0,0 +1,8 @@ +# datimutils 0.2.0 + +## Features + +* add `getUserGroups` +* add `listMechs` +* add `getMyStreams` +* add `getMyUserType` diff --git a/R/getMetadataEndpoint.R b/R/getMetadataEndpoint.R index e702a22b..e63bdb94 100644 --- a/R/getMetadataEndpoint.R +++ b/R/getMetadataEndpoint.R @@ -352,6 +352,20 @@ getDataSets <- function(values, ) } +#' @export +#' @rdname dot-getMetadataEndpoint +getUserGroups <- function(values, + by = "id", + fields = NULL, + d2_session = dynGet("d2_default_session", inherits = TRUE), retry = 1) { + .getMetadataEndpoint("userGroups", + values = values, + by = as.character(rlang::ensym(by)), + fields = fields, + d2_session = d2_session, retry = retry + ) +} + #' @export #' @rdname dot-getMetadataEndpoint getIndicatorGroupSets <- function(values, diff --git a/R/getMyStreams.R b/R/getMyStreams.R new file mode 100644 index 00000000..d10e006c --- /dev/null +++ b/R/getMyStreams.R @@ -0,0 +1,28 @@ +#' @export +#' @title getMyStreams(d2_session = dynGet("d2_default_session", inherits = TRUE)) +#' @description Returns datim user streams. For an implementation +#' example see: https://github.com/flopez-bao/shinyapps-datimutils-security-example-usgandpartners +#' @param d2_session the d2Session object, default is "d2_default_session", + + +getMyStreams <- + function(d2_session = dynGet("d2_default_session", inherits = TRUE)) { + # pull all user groups streams + tryCatch( + expr = { + user_groups <- getUserGroups(values = d2_session$me$userGroups$id, + d2_session = d2_session) + }, + error = function(e) { + stop("There was an error retrieving the user group information! Make sure you are logged into DATIM.") + } + ) + + # select from user_groups everything that is a data stream and needed for classification + user_groups <- user_groups[grepl("Data (.+?) access", user_groups)] + + # remove Data Access strings + streams <- sort(gsub("Data | access", "", user_groups)) + + return(streams) + } diff --git a/R/getMyUserType.R b/R/getMyUserType.R new file mode 100644 index 00000000..9339cf94 --- /dev/null +++ b/R/getMyUserType.R @@ -0,0 +1,46 @@ +#' @export +#' @title getMyUserType(d2_session = dynGet("d2_default_session", inherits = TRUE)) +#' @description Returns a classified user type based on accessible data streams. For an implementation +#' example see: https://github.com/flopez-bao/shinyapps-datimutils-security-example-usgandpartners +#' @param d2_session the d2Session object, default is "d2_default_session" + +getMyUserType <- function(d2_session = dynGet("d2_default_session",inherits = TRUE)) { + + #pull streams and classify + tryCatch( + expr = { + user_groups <- getUserGroups( + values = d2_session$me$userGroups$id, + d2_session = d2_session + ) + }, + error = function(e){ + stop("There was an error retrieving the user group information! Make sure you are logged into DATIM.") + } + ) + + # select from user_groups everything that is a data stream and needed for classification + streams <- user_groups[grepl("Data (.+?) access|^Global|^OU",user_groups)] + + # classify user + if( length( regmatches(streams ,regexpr("OU (.+?) MOH users", streams)) ) > 0 ) { + return("MOH") + } else if ( length(regmatches(streams ,regexpr("Global users", streams)) ) > 0 ) { + return("Global") + } else if ( length( regmatches(streams, regexpr("OU (.+?) Partner (.+?) users - (.+?)",streams)) ) > 0 ) { + return("Partner") + } else if ( length( regmatches(streams, regexpr("OU (.+?) Agency (.+?) users",streams)) ) > 0 ) { + return("Agency") + } else if ( length( regmatches(streams, regexpr("OU (.+?) Interagency users",streams)) ) > 0 ) { + return("Interagency") + } else if ( length( regmatches(streams, regexpr("Global Agency (.+?) users",streams)) ) > 0 ) { + return("Global Agency") + } else if ( length( regmatches(streams, regexpr("Global Partner (.+?) users - (.+?)",streams)) ) > 0 ) { + return("Global Partner") + } else { + return("Unclassified User") + } +} + + + diff --git a/R/listMechs.R b/R/listMechs.R new file mode 100644 index 00000000..960437da --- /dev/null +++ b/R/listMechs.R @@ -0,0 +1,45 @@ +#' @export +#' @title listMechs(option_fields = c("name", "id", "code"), +#' combo_fields = "id", +#' d2_session = dynGet("d2_default_session",inherits = TRUE) +#' @description Returns a dataframe with all mechanisms a user has access to. For an implementation +#' example see: https://github.com/flopez-bao/shinyapps-datimutils-security-example-usgandpartners +#' @param option_fields fields passed to the getMetaData endpoint. +#' @param combo_fields fields passed to getCatOptionCombos call. +#' @param d2_session the d2Session object, default is "d2_default_session" +#' @importFrom magrittr "%>%" + +listMechs <- function(option_fields = c("name", "id", "code"), + combo_fields = "id", + d2_session = dynGet("d2_default_session", + inherits = TRUE)) { + + + if (isFALSE(setequal(option_fields, c("name", "id", "code")))) { + stop("other fields are currently not supported.") + } else if (combo_fields != "id") { + stop("other fields are currently not supported.") + } else { + + df <- getMetadata(categoryOptions, + categories.id %.in% "SH885jaRe0o", + fields = option_fields, + d2_session = d2_session + ) %>% + dplyr::mutate(option_id = id, + combo_id = datimutils::getCatOptionCombos(code, + by = code, + fields = combo_fields, + d2_session = d2_session + )) %>% + dplyr::select(-id, + mech_code = code, + name, + option_id, + combo_id + ) + + return(df) + } + +} diff --git a/man/dot-getMetadataEndpoint.Rd b/man/dot-getMetadataEndpoint.Rd index 1ddbb56d..33913f63 100644 --- a/man/dot-getMetadataEndpoint.Rd +++ b/man/dot-getMetadataEndpoint.Rd @@ -12,6 +12,7 @@ \alias{getDataElementGroups} \alias{getDataElements} \alias{getDataSets} +\alias{getUserGroups} \alias{getIndicatorGroupSets} \alias{getIndicatorGroups} \alias{getIndicators} @@ -149,6 +150,14 @@ getDataSets( retry = 1 ) +getUserGroups( + values, + by = "id", + fields = NULL, + d2_session = dynGet("d2_default_session", inherits = TRUE), + retry = 1 +) + getIndicatorGroupSets( values, by = "id", diff --git a/man/getMyStreams.Rd b/man/getMyStreams.Rd new file mode 100644 index 00000000..618561a9 --- /dev/null +++ b/man/getMyStreams.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/getMyStreams.R +\name{getMyStreams} +\alias{getMyStreams} +\title{getMyStreams(d2_session = dynGet("d2_default_session", inherits = TRUE))} +\usage{ +getMyStreams(d2_session = dynGet("d2_default_session", inherits = TRUE)) +} +\arguments{ +\item{d2_session}{the d2Session object, default is "d2_default_session",} +} +\description{ +Returns datim user streams. For an implementation +example see: https://github.com/flopez-bao/shinyapps-datimutils-security-example-usgandpartners +} diff --git a/man/getMyUserType.Rd b/man/getMyUserType.Rd new file mode 100644 index 00000000..3018767e --- /dev/null +++ b/man/getMyUserType.Rd @@ -0,0 +1,15 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/getMyUserType.R +\name{getMyUserType} +\alias{getMyUserType} +\title{getMyUserType(d2_session = dynGet("d2_default_session", inherits = TRUE))} +\usage{ +getMyUserType(d2_session = dynGet("d2_default_session", inherits = TRUE)) +} +\arguments{ +\item{d2_session}{the d2Session object, default is "d2_default_session"} +} +\description{ +Returns a classified user type based on accessible data streams. For an implementation +example see: https://github.com/flopez-bao/shinyapps-datimutils-security-example-usgandpartners +} diff --git a/man/listMechs.Rd b/man/listMechs.Rd new file mode 100644 index 00000000..3e99a2bd --- /dev/null +++ b/man/listMechs.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/listMechs.R +\name{listMechs} +\alias{listMechs} +\title{listMechs(option_fields = c("name", "id", "code"), +combo_fields = "id", +d2_session = dynGet("d2_default_session",inherits = TRUE)} +\usage{ +listMechs( + option_fields = c("name", "id", "code"), + combo_fields = "id", + d2_session = dynGet("d2_default_session", inherits = TRUE) +) +} +\arguments{ +\item{option_fields}{fields passed to the getMetaData endpoint.} + +\item{combo_fields}{fields passed to getCatOptionCombos call.} + +\item{d2_session}{the d2Session object, default is "d2_default_session"} +} +\description{ +Returns a dataframe with all mechanisms a user has access to. For an implementation +example see: https://github.com/flopez-bao/shinyapps-datimutils-security-example-usgandpartners +} diff --git a/tests/testthat/helper.R b/tests/testthat/helper.R index 470e84b5..ebba5d38 100644 --- a/tests/testthat/helper.R +++ b/tests/testthat/helper.R @@ -9,3 +9,7 @@ play2335 <- list(base_url = "https://play.dhis2.org/2.33.5/", handle = httr::handle("https://play.dhis2.org/2.33.5/")) play2341 <- list(base_url = "https://play.dhis2.org/2.34.1/", handle = httr::handle("https://play.dhis2.org/2.34.1/")) +play2372 <- list(base_url = "https://play.dhis2.org/2.37.2/", + handle = httr::handle("https://play.dhis2.org/2.37.2/")) +test <- list(base_url = "https://test.datim.org/", + handle = httr::handle("https://test.datim.org/")) diff --git a/tests/testthat/play.dhis2.org/2.37.2/api/userGroups.json-3eb0bf.json b/tests/testthat/play.dhis2.org/2.37.2/api/userGroups.json-3eb0bf.json new file mode 100644 index 00000000..8a1096dd --- /dev/null +++ b/tests/testthat/play.dhis2.org/2.37.2/api/userGroups.json-3eb0bf.json @@ -0,0 +1,8 @@ +{ + "userGroups": [ + { + "name": "Family Health Partner", + "id": "ZrsVF7IJ93y" + } + ] +} diff --git a/tests/testthat/test-getMetadataEndpoint.r b/tests/testthat/test-getMetadataEndpoint.r index 693ed79d..8be514fd 100644 --- a/tests/testthat/test-getMetadataEndpoint.r +++ b/tests/testthat/test-getMetadataEndpoint.r @@ -541,6 +541,13 @@ data <- getOrgUnits("Afro Arab Clinic", d2_session = play235) testthat::expect_identical(data,"ART monthly summary") rm(data) + + data <- getUserGroups( + "ZrsVF7IJ93y", + d2_session = play2372 + ) + testthat::expect_identical(data,"Family Health Partner") + rm(data) data <- getIndicatorGroupSets( "tOwnTs7TL3Y", diff --git a/tests/testthat/test-getMyStreams.R b/tests/testthat/test-getMyStreams.R new file mode 100644 index 00000000..072575e7 --- /dev/null +++ b/tests/testthat/test-getMyStreams.R @@ -0,0 +1,103 @@ +# testing getMyStreams + +# STEPS +# 1. mock apis are recorded in the "test" server +# 2. we loop through user_group_list a list object in helper.R with all response params and checks +# 3. test base url and handle are passed from helper.R to this custom d2 session +# 3. we test the response against th expected streams for that user in helper.R + +# accounts ---------- + +# list out uids +user_group_list <- + list( + uids = + list( + c("M9Uer9SioL7","zpgv1M2Li1Q","seh1e61fwp1","XgctRYBpSiR","TRBfaInIiOK"), + c("M9Uer9SioL7","seh1e61fwp1","G1O0MJgw8rs","XgctRYBpSiR","TRBfaInIiOK"), + c("seh1e61fwp1","c6hGi8GEZot","M9Uer9SioL7","gh9tn4QBbKZ","CwFniyubXbx","OoiLAfMTyMx", + "iuD8wUFz95X","ik8m9tx6QEw","TRBfaInIiOK","SBtczqnORYA" + ), + c("o8ap0XE01bh", "c6hGi8GEZot", "zY2t7de7Jzz", "TRBfaInIiOK"), + c("OoiLAfMTyMx", "cveLo35sHE9"), + c("BQCE8Nh9TRn","M9Uer9SioL7","seh1e61fwp1","XgctRYBpSiR","TRBfaInIiOK","LLXM2rpL69u" + ), + c("d3E1aOVZZkZ","M9Uer9SioL7","e1HnTm7vg38","tTSFg9jRcIB","seh1e61fwp1", + "TRBfaInIiOK","zZ711zXQxw8","c6hGi8GEZot" + ), + c("zZ711zXQxw8") + ), + streams = + list( + c("ER","ESOP","HRH"), + c("ER","ESOP","HRH"), + c("ER","ESOP","HRH","MER","MOH","SaSR","SIMS"), + c("ESOP","MER"), + c("MOH"), + c("ER","ESOP","HRH"), + c("DHI","ER","ESOP","HRH","MCAE","MER"), + c("DHI") + ), + user_type = + list( + "Agency", + "Global Agency", + "Global", + "Interagency", + "MOH", + "Partner", + "Global Partner", + "Unclassified User" + ) + ) + +# test data streams ----- +httptest::with_mock_api({ + test_that("test data streams returned are accurate for specific accounts...", + { + lapply(1:length(user_group_list$uids), function(user) { + # parameters + uids <- unlist(user_group_list$uids[user]) + streams <- unlist(user_group_list$streams[user]) + + # pull data + data <- + getMyStreams(d2_session = list( + base_url = test$base_url, + handle = test$handle, + me = list(userGroups = + as.data.frame( + list( + id = as.character(uids) + ), + stringsAsFactors = F + ) + ) + )) + + # compare data to existing + testthat::expect_equal(sort(data), sort(streams)) + rm(data, streams) + }) + }) +}) + +# test error handling ---- + httptest::with_mock_api({ + test_that("testing error where user group is not returned...", { + # expect error with invalid ids + expect_error( + getMyStreams( + d2_session = list( + base_url = test$base_url, + handle = test$handle, + me = list(userGroups = + as.data.frame(list(id = c( + "0001" + )))) + ) + ), + "There was an error retrieving the user group information! Make sure you are logged into DATIM." + ) + }) + }) diff --git a/tests/testthat/test-getMyUserType.R b/tests/testthat/test-getMyUserType.R new file mode 100644 index 00000000..02eeb10f --- /dev/null +++ b/tests/testthat/test-getMyUserType.R @@ -0,0 +1,104 @@ +# testing getMyUserType + +# STEPS +# 1. mock apis are recorded in the "test" server +# 2. we loop through user_group_list a list object in helper.R with all response params and checks +# 3. test base url and handle are passed from helper.R to this custom d2 session +# 3. we test the response against th expected streams for that user in helper.R + +# accounts ---------- + +# list out uids +user_group_list <- + list( + uids = + list( + c("M9Uer9SioL7","zpgv1M2Li1Q","seh1e61fwp1","XgctRYBpSiR","TRBfaInIiOK"), + c("M9Uer9SioL7","seh1e61fwp1","G1O0MJgw8rs","XgctRYBpSiR","TRBfaInIiOK"), + c("seh1e61fwp1","c6hGi8GEZot","M9Uer9SioL7","gh9tn4QBbKZ","CwFniyubXbx","OoiLAfMTyMx", + "iuD8wUFz95X","ik8m9tx6QEw","TRBfaInIiOK","SBtczqnORYA" + ), + c("o8ap0XE01bh", "c6hGi8GEZot", "zY2t7de7Jzz", "TRBfaInIiOK"), + c("OoiLAfMTyMx", "cveLo35sHE9"), + c("BQCE8Nh9TRn","M9Uer9SioL7","seh1e61fwp1","XgctRYBpSiR","TRBfaInIiOK","LLXM2rpL69u" + ), + c("d3E1aOVZZkZ","M9Uer9SioL7","e1HnTm7vg38","tTSFg9jRcIB","seh1e61fwp1", + "TRBfaInIiOK","zZ711zXQxw8","c6hGi8GEZot" + ), + c("zZ711zXQxw8") + ), + streams = + list( + c("ER","ESOP","HRH"), + c("ER","ESOP","HRH"), + c("ER","ESOP","HRH","MER","MOH","SaSR","SIMS"), + c("ESOP","MER"), + c("MOH"), + c("ER","ESOP","HRH"), + c("DHI","ER","ESOP","HRH","MCAE","MER"), + c("DHI") + ), + user_type = + list( + "Agency", + "Global Agency", + "Global", + "Interagency", + "MOH", + "Partner", + "Global Partner", + "Unclassified User" + ) + ) + + +# test proper user classification ---- +httptest::with_mock_api({ + test_that("test that user types returned are accurate for specific accounts...", + { + lapply(1:length(user_group_list$uids), function(user) { + # parameters + uids <- unlist(user_group_list$uids[user]) + user_type <- unlist(user_group_list$user_type[user]) + + # pull data + data <- + getMyUserType(d2_session = list( + base_url = test$base_url, + handle = test$handle, + me = list(userGroups = + as.data.frame( + list( + id = uids + ), + stringsAsFactors = F + ) + ) + )) + + # compare data to existing + testthat::expect_equal(data, user_type) + rm(data, user_type) + }) + }) +}) + +# test error handling ----- + httptest::with_mock_api({ + test_that("testing error...", { + # expect error with invalid ids + expect_error( + getMyUserType( + d2_session = list( + base_url = test$base_url, + handle = test$handle, + me = list(userGroups = + as.data.frame(list(id = c( + "0001" + )))) + ) + ), + "There was an error retrieving the user group information! Make sure you are logged into DATIM." + ) + }) + }) diff --git a/tests/testthat/test-listMechs.R b/tests/testthat/test-listMechs.R new file mode 100644 index 00000000..207411ec --- /dev/null +++ b/tests/testthat/test-listMechs.R @@ -0,0 +1,71 @@ +# test for appropriate columnns ----- +httptest::with_mock_api({ + test_that("test that appropriate columns are returned...", { + + # data and benchmark + data <- listMechs(d2_session = test) + columns <- c("mech_code","name","option_id","combo_id") + + # test equvalence + testthat::expect_equal( + names(data), + columns + ) + + #rm data + rm(data, columns) + + }) +}) + +# test that the right mech list count is returned ---- +# pulled mock mech list from test user a_cmr_hhscdc +httptest::with_mock_api({ +test_that("test should return less than 8000 mechs for this user...", { + + # pull data, compare, clean + data <- listMechs(d2_session = test) + testthat:::expect_lt(nrow(data), 8000) + rm(data) + + }) +}) + +# test the error message with wrong options fields ---- +httptest::with_mock_api({ + test_that("testing error on option fields...", { + + # expect error with invalid ids + expect_error( + listMechs( + option_fields = c("name","ids", "code"), + d2_session = test + ), + "other fields are currently not supported." + ) + + }) +}) + + +# test the error message with wrong combo fields ---- +httptest::with_mock_api({ + test_that("testing error on combo field...", { + + # expect error with invalid ids + expect_error( + listMechs( + combo_fields = "ids", + d2_session = test + ), + "other fields are currently not supported." + ) + + }) +}) + + + + + + diff --git a/tests/testthat/test.datim.org/api/categoryOptionCombos.json-911181.R b/tests/testthat/test.datim.org/api/categoryOptionCombos.json-911181.R new file mode 100644 index 00000000..82a55c83 --- /dev/null +++ b/tests/testthat/test.datim.org/api/categoryOptionCombos.json-911181.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/categoryOptionCombos.json?paging=false&filter=code:in:[13003,13257,13745,13799,14118,14123,14127,14175,14659,160095,160096,160097,160098,160099,160100,160101,160102,16814,16816,17336,17361,17362,17363,17526,18062,18080,18228,18229,18230,18667,70028,70029,70030,70031,70032,80023,80033,80042,81577,81578,81579,81580,81581,81582,84135,84136,84137,84138,84139,84140,85434,85435,85436,85437,85438,85439]&fields=code,id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Mon, 14 Feb 2022 16:59:07 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0e669a97ecc0a5255b96bd6a19b8486b1\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Mon, 14 Feb 2022 16:59:07 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0e669a97ecc0a5255b96bd6a19b8486b1\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"categoryOptionCombos\":[{\"code\":\"13003\",\"name\":\"13003 - Strengthening the capacity of the National AIDS Control Committee to ensure prevention of HIV in health-care settings\",\"id\":\"st87YC1l5Fd\"},{\"code\":\"13257\",\"name\":\"13257 - Implementation of PMTCT CoAg1\",\"id\":\"jyhMhDWiNne\"},{\"code\":\"13745\",\"name\":\"13745 - ICAP Columbia University\",\"id\":\"kReFMQGZac2\"},{\"code\":\"13799\",\"name\":\"13799 - GHSS-Strengthening Public Health Laboratory Systems in Cameroon\",\"id\":\"Lsc6GpYfmLa\"},{\"code\":\"14118\",\"name\":\"14118 - Strengthening Clinical Laboratory Workforce\",\"id\":\"Zn4w7tfHR4C\"},{\"code\":\"14123\",\"name\":\"14123 - Laboratory Equipment Maintenance: Pre-service training for Biomedical Engineers and Technicians.\",\"id\":\"eMQk3aOoTiF\"},{\"code\":\"14127\",\"name\":\"14127 - GH001180 - WHO Cameroon\",\"id\":\"JIBboDEZgDg\"},{\"code\":\"14175\",\"name\":\"14175 - Partnerships for elimination of MTCT\",\"id\":\"X8Sv40PXZfV\"},{\"code\":\"14659\",\"name\":\"14659 - Integration of comprehensive PMTCT activities into MCH services\",\"id\":\"peDYYL02EsN\"},{\"code\":\"160095\",\"name\":\"160095 - TBDawardHHSCDC - [Placeholder - 160095 Cameroon HHS/CDC]\",\"id\":\"alfIMGBJFCy\"},{\"code\":\"160096\",\"name\":\"160096 - GH002303 - JEMBI HQ\",\"id\":\"y6hLLgcrL9S\"},{\"code\":\"160097\",\"name\":\"160097 - GH002171 - ICAP HQ Recency\",\"id\":\"MhalIwuxjTe\"},{\"code\":\"160098\",\"name\":\"160098 - TBDawardHHSCDC - [Placeholder - 160098 Cameroon HHS/CDC]\",\"id\":\"B3Ua8h2GwGL\"},{\"code\":\"160099\",\"name\":\"160099 - TBDawardHHSCDC - [Placeholder - 160099 Cameroon HHS/CDC]\",\"id\":\"wDvmB0gzCgV\"},{\"code\":\"160100\",\"name\":\"160100 - TBDawardHHSCDC - [Placeholder - 160100 Cameroon HHS/CDC]\",\"id\":\"qWihYULNvo9\"},{\"code\":\"160101\",\"name\":\"160101 - TBDawardHHSCDC - [Placeholder - 160101 Cameroon HHS/CDC]\",\"id\":\"vBjVvI8SFF8\"},{\"code\":\"160102\",\"name\":\"160102 - TBDawardHHSCDC - [Placeholder - 160102 Cameroon HHS/CDC]\",\"id\":\"Z37eAfDsNMB\"},{\"code\":\"16814\",\"name\":\"16814 - Supporting the field epidemiology training program (FELTP) in Cameroon\",\"id\":\"FZc52EnPUHV\"},{\"code\":\"16816\",\"name\":\"16816 - Technical Assistance support in assessing HIV service delivery in Cameroon\",\"id\":\"Aj9UuKPX3ZQ\"},{\"code\":\"17336\",\"name\":\"17336 - Columbia ICAP 2014 CDC HQ mech\",\"id\":\"TTaK9lFPVox\"},{\"code\":\"17361\",\"name\":\"17361 - GH001354 - CBCHB - PMTCT-ART Center-Littoral 2015\",\"id\":\"H2htM7729M8\"},{\"code\":\"17362\",\"name\":\"17362 - Safe Blood for Africa CDC 2015\",\"id\":\"gHOSizWzTHy\"},{\"code\":\"17363\",\"name\":\"17363 - TBD UNICEF follow-on CDC 2015\",\"id\":\"q4i4Jm9qwiZ\"},{\"code\":\"17526\",\"name\":\"17526 - TBD FELTP CDC new mechanism 2015\",\"id\":\"JdAb8xwQU6j\"},{\"code\":\"18062\",\"name\":\"18062 - Strengthening the Capacity of the National AIDS Control Commitee to Ensure Prevention of HIV in Health Care Settings\",\"id\":\"RQgvaO8HKKd\"},{\"code\":\"18080\",\"name\":\"18080 - ICAP - PMTCT-ART Center-Littoral 2015\",\"id\":\"K0iPH9GPdvi\"},{\"code\":\"18228\",\"name\":\"18228 - GH002013 - ART services in 8 regions\",\"id\":\"zy83YePmu9g\"},{\"code\":\"18229\",\"name\":\"18229 - NU2GGH002096 - Strengthening the Capacity of the National AIDS Control Committee\",\"id\":\"EMAzFOo5VDh\"},{\"code\":\"18230\",\"name\":\"18230 - 7NUGGHOO2102 - Strengthening Public Health Laboratory Systems in Cameroon\",\"id\":\"Z2oQED25Xhb\"},{\"code\":\"18667\",\"name\":\"18667 - NU2GGH002179 - TBD Yaounde Cluster Clinical Services - Centre TBD\",\"id\":\"Ik1x7NJpmQ6\"},{\"code\":\"70028\",\"name\":\"70028 - GH002176 - National TB Program\",\"id\":\"ARWmbEU8vgk\"},{\"code\":\"70029\",\"name\":\"70029 - GH002154 - [Placeholder - 70029 Cameroon HHS/CDC]\",\"id\":\"NpPAPQ9mLii\"},{\"code\":\"70030\",\"name\":\"70030 - GH001619 - [Placeholder - 70030 Cameroon HHS/CDC]\",\"id\":\"Euxh7Iak3RA\"},{\"code\":\"70031\",\"name\":\"70031 - NU2GGH002178 - EGPAF\",\"id\":\"RQe1HXHlY1H\"},{\"code\":\"70032\",\"name\":\"70032 - [Placeholder - 70032 Cameroon HHS/CDC]\",\"id\":\"SAROglNEeRh\"},{\"code\":\"80023\",\"name\":\"80023 - UCSF - HMIS\",\"id\":\"DVHOUsr0opa\"},{\"code\":\"80033\",\"name\":\"80033 - TBD Littoral\",\"id\":\"A4aVnpZ6mnB\"},{\"code\":\"80042\",\"name\":\"80042 - HMIS TBD - COP 17 Central Initiative\",\"id\":\"sbkEzuju4pB\"},{\"code\":\"81577\",\"name\":\"81577 - TBDawardHHSCDC - [Placeholder - 81577 Cameroon HHS/CDC]\",\"id\":\"A4pjpH0tyeP\"},{\"code\":\"81578\",\"name\":\"81578 - TBDawardHHSCDC - [Placeholder - 81578 Cameroon HHS/CDC]\",\"id\":\"KoMkBxzBGwS\"},{\"code\":\"81579\",\"name\":\"81579 - GH001531 - CARDNO\",\"id\":\"o72Xb6OpvLk\"},{\"code\":\"81580\",\"name\":\"81580 - GH002216 - Zone 4 ICAP Columbia University\",\"id\":\"wznLur3KNtI\"},{\"code\":\"81581\",\"name\":\"81581 - GH002214 - Zone 3 Georgetown University\",\"id\":\"rx0lPQmDJCv\"},{\"code\":\"81582\",\"name\":\"81582 - GH002154 - WHO\",\"id\":\"iBgdaPu42Tv\"},{\"code\":\"84135\",\"name\":\"84135 - GH001971 - UNAIDS\",\"id\":\"ndyJFddshSj\"},{\"code\":\"84136\",\"name\":\"84136 - TBDawardHHSCDC - [Placeholder - 84136 Cameroon HHS/CDC]\",\"id\":\"MeTWVOdAhCh\"},{\"code\":\"84137\",\"name\":\"84137 - TBDawardHHSCDC - [Placeholder - 84137 Cameroon HHS/CDC]\",\"id\":\"mwzmHuFck11\"},{\"code\":\"84138\",\"name\":\"84138 - TBDawardHHSCDC - [Placeholder - 84138 Cameroon HHS/CDC]\",\"id\":\"UNzyCaRoq5H\"},{\"code\":\"84139\",\"name\":\"84139 - TBDawardHHSCDC - [Placeholder - 84139 Cameroon HHS/CDC]\",\"id\":\"lg9f1YioHKO\"},{\"code\":\"84140\",\"name\":\"84140 - TBDawardHHSCDC - [Placeholder - 84140 Cameroon HHS/CDC]\",\"id\":\"pvIBsKCtEo0\"},{\"code\":\"85434\",\"name\":\"85434 - TBDawardHHSCDC - [Placeholder - 85434 Cameroon HHS/CDC]\",\"id\":\"u8EUX5PyOuF\"},{\"code\":\"85435\",\"name\":\"85435 - TBDawardHHSCDC - [Placeholder - 85435 Cameroon HHS/CDC]\",\"id\":\"Ser8a92oZvd\"},{\"code\":\"85436\",\"name\":\"85436 - TBDawardHHSCDC - [Placeholder - 85436 Cameroon HHS/CDC]\",\"id\":\"HJEGaVbwtrb\"},{\"code\":\"85437\",\"name\":\"85437 - TBDawardHHSCDC - [Placeholder - 85437 Cameroon HHS/CDC]\",\"id\":\"leSeIRCg7fF\"},{\"code\":\"85438\",\"name\":\"85438 - TBDawardHHSCDC - [Placeholder - 85438 Cameroon HHS/CDC]\",\"id\":\"tjI9ILvMovQ\"},{\"code\":\"85439\",\"name\":\"85439 - TBDawardHHSCDC - [Placeholder - 85439 Cameroon HHS/CDC]\",\"id\":\"bxbNxCIDIAk\"}]}"), + date = structure(1644857947, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 3.2e-05, + connect = 3.3e-05, pretransfer = 9.8e-05, starttransfer = 0.026852, + total = 0.026928)), class = "response") diff --git a/tests/testthat/test.datim.org/api/categoryOptions.json-5dcc23.R b/tests/testthat/test.datim.org/api/categoryOptions.json-5dcc23.R new file mode 100644 index 00000000..49192c5e --- /dev/null +++ b/tests/testthat/test.datim.org/api/categoryOptions.json-5dcc23.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/categoryOptions.json?paging=false&filter=categories.id:in:[SH885jaRe0o]&fields=name,id,code", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Mon, 14 Feb 2022 16:59:07 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0249f0f8882ec10e99f18a17cb1413366\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Mon, 14 Feb 2022 16:59:07 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0249f0f8882ec10e99f18a17cb1413366\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"categoryOptions\":[{\"code\":\"13003\",\"name\":\"13003 - Strengthening the capacity of the National AIDS Control Committee to ensure prevention of HIV in health-care settings\",\"id\":\"zhbuiJsOiHI\"},{\"code\":\"13257\",\"name\":\"13257 - Implementation of PMTCT CoAg1\",\"id\":\"OBKhsKcIOnP\"},{\"code\":\"13745\",\"name\":\"13745 - ICAP Columbia University\",\"id\":\"YQKKRIDLQgJ\"},{\"code\":\"13799\",\"name\":\"13799 - GHSS-Strengthening Public Health Laboratory Systems in Cameroon\",\"id\":\"T48ASEXsGnw\"},{\"code\":\"14118\",\"name\":\"14118 - Strengthening Clinical Laboratory Workforce\",\"id\":\"AhhwZeBYkGr\"},{\"code\":\"14123\",\"name\":\"14123 - Laboratory Equipment Maintenance: Pre-service training for Biomedical Engineers and Technicians.\",\"id\":\"yobBjUdGrnN\"},{\"code\":\"14127\",\"name\":\"14127 - GH001180 - WHO Cameroon\",\"id\":\"gSrW64Ru7Ia\"},{\"code\":\"14175\",\"name\":\"14175 - Partnerships for elimination of MTCT\",\"id\":\"MdHsyZBIRHn\"},{\"code\":\"14659\",\"name\":\"14659 - Integration of comprehensive PMTCT activities into MCH services\",\"id\":\"o7fgGP4ALze\"},{\"code\":\"160095\",\"name\":\"160095 - TBDawardHHSCDC - [Placeholder - 160095 Cameroon HHS/CDC]\",\"id\":\"w1x3V4aGayW\"},{\"code\":\"160096\",\"name\":\"160096 - GH002303 - JEMBI HQ\",\"id\":\"t1yeswvoUWI\"},{\"code\":\"160097\",\"name\":\"160097 - GH002171 - ICAP HQ Recency\",\"id\":\"uFLJK4u7SvS\"},{\"code\":\"160098\",\"name\":\"160098 - TBDawardHHSCDC - [Placeholder - 160098 Cameroon HHS/CDC]\",\"id\":\"AUeSmDW7ED9\"},{\"code\":\"160099\",\"name\":\"160099 - TBDawardHHSCDC - [Placeholder - 160099 Cameroon HHS/CDC]\",\"id\":\"k7yqg6x7SbG\"},{\"code\":\"160100\",\"name\":\"160100 - TBDawardHHSCDC - [Placeholder - 160100 Cameroon HHS/CDC]\",\"id\":\"aYMPi4X8YVS\"},{\"code\":\"160101\",\"name\":\"160101 - TBDawardHHSCDC - [Placeholder - 160101 Cameroon HHS/CDC]\",\"id\":\"SnaCCMNNuze\"},{\"code\":\"160102\",\"name\":\"160102 - TBDawardHHSCDC - [Placeholder - 160102 Cameroon HHS/CDC]\",\"id\":\"NM4VPm8COZE\"},{\"code\":\"16814\",\"name\":\"16814 - Supporting the field epidemiology training program (FELTP) in Cameroon\",\"id\":\"KLhTopg2TqV\"},{\"code\":\"16816\",\"name\":\"16816 - Technical Assistance support in assessing HIV service delivery in Cameroon\",\"id\":\"Ju6U2VaHFZW\"},{\"code\":\"17336\",\"name\":\"17336 - Columbia ICAP 2014 CDC HQ mech\",\"id\":\"OQH5xC4NrwT\"},{\"code\":\"17361\",\"name\":\"17361 - GH001354 - CBCHB - PMTCT-ART Center-Littoral 2015\",\"id\":\"HskgfFBlY5h\"},{\"code\":\"17362\",\"name\":\"17362 - Safe Blood for Africa CDC 2015\",\"id\":\"qZcoTFPSpiq\"},{\"code\":\"17363\",\"name\":\"17363 - TBD UNICEF follow-on CDC 2015\",\"id\":\"O9wHZ9PWwct\"},{\"code\":\"17526\",\"name\":\"17526 - TBD FELTP CDC new mechanism 2015\",\"id\":\"NjQR0ODgl5M\"},{\"code\":\"18062\",\"name\":\"18062 - Strengthening the Capacity of the National AIDS Control Commitee to Ensure Prevention of HIV in Health Care Settings\",\"id\":\"mbfwYL6281b\"},{\"code\":\"18080\",\"name\":\"18080 - ICAP - PMTCT-ART Center-Littoral 2015\",\"id\":\"sq2GlhSyOos\"},{\"code\":\"18228\",\"name\":\"18228 - GH002013 - ART services in 8 regions\",\"id\":\"D8O6OeHxy1w\"},{\"code\":\"18229\",\"name\":\"18229 - NU2GGH002096 - Strengthening the Capacity of the National AIDS Control Committee\",\"id\":\"xWMCgzn1EPS\"},{\"code\":\"18230\",\"name\":\"18230 - 7NUGGHOO2102 - Strengthening Public Health Laboratory Systems in Cameroon\",\"id\":\"JoCWk1rzoxx\"},{\"code\":\"18667\",\"name\":\"18667 - NU2GGH002179 - TBD Yaounde Cluster Clinical Services - Centre TBD\",\"id\":\"sq3p1idYJUR\"},{\"code\":\"70028\",\"name\":\"70028 - GH002176 - National TB Program\",\"id\":\"trMF1zkzpOl\"},{\"code\":\"70029\",\"name\":\"70029 - GH002154 - [Placeholder - 70029 Cameroon HHS/CDC]\",\"id\":\"CT91ktmlNDL\"},{\"code\":\"70030\",\"name\":\"70030 - GH001619 - [Placeholder - 70030 Cameroon HHS/CDC]\",\"id\":\"l47fiYNOLVe\"},{\"code\":\"70031\",\"name\":\"70031 - NU2GGH002178 - EGPAF\",\"id\":\"ACu2BnY1Vuc\"},{\"code\":\"70032\",\"name\":\"70032 - [Placeholder - 70032 Cameroon HHS/CDC]\",\"id\":\"Gt6JycEyYfc\"},{\"code\":\"80023\",\"name\":\"80023 - UCSF - HMIS\",\"id\":\"hUmiPLkkhZp\"},{\"code\":\"80033\",\"name\":\"80033 - TBD Littoral\",\"id\":\"nv31PHMDARv\"},{\"code\":\"80042\",\"name\":\"80042 - HMIS TBD - COP 17 Central Initiative\",\"id\":\"twsFQJ0zuSK\"},{\"code\":\"81577\",\"name\":\"81577 - TBDawardHHSCDC - [Placeholder - 81577 Cameroon HHS/CDC]\",\"id\":\"YFYp20Eh4cN\"},{\"code\":\"81578\",\"name\":\"81578 - TBDawardHHSCDC - [Placeholder - 81578 Cameroon HHS/CDC]\",\"id\":\"q2djuRwrQak\"},{\"code\":\"81579\",\"name\":\"81579 - GH001531 - CARDNO\",\"id\":\"L9djlNCUvFS\"},{\"code\":\"81580\",\"name\":\"81580 - GH002216 - Zone 4 ICAP Columbia University\",\"id\":\"O9tBdoa10JU\"},{\"code\":\"81581\",\"name\":\"81581 - GH002214 - Zone 3 Georgetown University\",\"id\":\"XmeorMy97LB\"},{\"code\":\"81582\",\"name\":\"81582 - GH002154 - WHO\",\"id\":\"kr1PqomKqsG\"},{\"code\":\"84135\",\"name\":\"84135 - GH001971 - UNAIDS\",\"id\":\"MBGilNJzF7v\"},{\"code\":\"84136\",\"name\":\"84136 - TBDawardHHSCDC - [Placeholder - 84136 Cameroon HHS/CDC]\",\"id\":\"mV9MK9PZIHX\"},{\"code\":\"84137\",\"name\":\"84137 - TBDawardHHSCDC - [Placeholder - 84137 Cameroon HHS/CDC]\",\"id\":\"Qj7q9VR85SK\"},{\"code\":\"84138\",\"name\":\"84138 - TBDawardHHSCDC - [Placeholder - 84138 Cameroon HHS/CDC]\",\"id\":\"iGNFKqdeZI2\"},{\"code\":\"84139\",\"name\":\"84139 - TBDawardHHSCDC - [Placeholder - 84139 Cameroon HHS/CDC]\",\"id\":\"BrJ4CMJkoyV\"},{\"code\":\"84140\",\"name\":\"84140 - TBDawardHHSCDC - [Placeholder - 84140 Cameroon HHS/CDC]\",\"id\":\"iWwNKm8RE3N\"},{\"code\":\"85434\",\"name\":\"85434 - TBDawardHHSCDC - [Placeholder - 85434 Cameroon HHS/CDC]\",\"id\":\"XK2pq6jEFal\"},{\"code\":\"85435\",\"name\":\"85435 - TBDawardHHSCDC - [Placeholder - 85435 Cameroon HHS/CDC]\",\"id\":\"gM5MUKIVGOd\"},{\"code\":\"85436\",\"name\":\"85436 - TBDawardHHSCDC - [Placeholder - 85436 Cameroon HHS/CDC]\",\"id\":\"vJWUTe6OQ1f\"},{\"code\":\"85437\",\"name\":\"85437 - TBDawardHHSCDC - [Placeholder - 85437 Cameroon HHS/CDC]\",\"id\":\"rWsuixoNn1a\"},{\"code\":\"85438\",\"name\":\"85438 - TBDawardHHSCDC - [Placeholder - 85438 Cameroon HHS/CDC]\",\"id\":\"fZRudjMAhdJ\"},{\"code\":\"85439\",\"name\":\"85439 - TBDawardHHSCDC - [Placeholder - 85439 Cameroon HHS/CDC]\",\"id\":\"HY2DG0dKirD\"}]}"), + date = structure(1644857947, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.3e-05, + connect = 0.025217, pretransfer = 0.071907, starttransfer = 0.165455, + total = 0.165526)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-0f1886.R b/tests/testthat/test.datim.org/api/userGroups.json-0f1886.R new file mode 100644 index 00000000..30c96e41 --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-0f1886.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[BQCE8Nh9TRn,M9Uer9SioL7,seh1e61fwp1,XgctRYBpSiR,TRBfaInIiOK,LLXM2rpL69u]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Thu, 03 Mar 2022 22:47:17 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"03fa7df44f93fe26f2d865f06474d513a\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Thu, 03 Mar 2022 22:47:17 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"03fa7df44f93fe26f2d865f06474d513a\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data ER access\",\"id\":\"M9Uer9SioL7\"},{\"name\":\"Data ER entry\",\"id\":\"XgctRYBpSiR\"},{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data HRH access\",\"id\":\"seh1e61fwp1\"},{\"name\":\"Data HRH entry\",\"id\":\"LLXM2rpL69u\"},{\"name\":\"OU Cameroon Partner 557733512 users - Global Health Systems Solutio ns\",\"id\":\"BQCE8Nh9TRn\"}]}"), + date = structure(1646347637, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4.1e-05, + connect = 4.3e-05, pretransfer = 0.000105, starttransfer = 0.476694, + total = 0.476818)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-331060.R b/tests/testthat/test.datim.org/api/userGroups.json-331060.R new file mode 100644 index 00000000..c793e89f --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-331060.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[OoiLAfMTyMx,cveLo35sHE9]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Thu, 03 Mar 2022 22:47:02 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0003eb8f88f8fabbc0664b579e0f850f3\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Thu, 03 Mar 2022 22:47:02 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0003eb8f88f8fabbc0664b579e0f850f3\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data MOH access\",\"id\":\"OoiLAfMTyMx\"},{\"name\":\"OU South Africa MOH users\",\"id\":\"cveLo35sHE9\"}]}"), + date = structure(1646347622, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4.2e-05, + connect = 4.3e-05, pretransfer = 0.000105, starttransfer = 0.041371, + total = 0.041426)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-3c3e8d.R b/tests/testthat/test.datim.org/api/userGroups.json-3c3e8d.R new file mode 100644 index 00000000..64efadc0 --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-3c3e8d.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[M9Uer9SioL7,zpgv1M2Li1Q,seh1e61fwp1,XgctRYBpSiR,TRBfaInIiOK]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Thu, 03 Mar 2022 22:45:43 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"03b9dd5ba3c0e04c340dbc219be837ba4\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Thu, 03 Mar 2022 22:45:43 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"03b9dd5ba3c0e04c340dbc219be837ba4\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data ER access\",\"id\":\"M9Uer9SioL7\"},{\"name\":\"Data ER entry\",\"id\":\"XgctRYBpSiR\"},{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data HRH access\",\"id\":\"seh1e61fwp1\"},{\"name\":\"OU Cameroon Agency HHS/CDC users\",\"id\":\"zpgv1M2Li1Q\"}]}"), + date = structure(1646347543, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4e-05, + connect = 4.2e-05, pretransfer = 0.000102, starttransfer = 0.056681, + total = 0.056727)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-4171d7.R b/tests/testthat/test.datim.org/api/userGroups.json-4171d7.R new file mode 100644 index 00000000..d3e71672 --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-4171d7.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[seh1e61fwp1,c6hGi8GEZot,M9Uer9SioL7,gh9tn4QBbKZ,CwFniyubXbx,OoiLAfMTyMx,iuD8wUFz95X,ik8m9tx6QEw,TRBfaInIiOK,SBtczqnORYA]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Mon, 14 Feb 2022 16:57:57 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0d742cb8c9f97a1958904e684452feaee\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Mon, 14 Feb 2022 16:57:57 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0d742cb8c9f97a1958904e684452feaee\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data ER access\",\"id\":\"M9Uer9SioL7\"},{\"name\":\"Data ER admin\",\"id\":\"SBtczqnORYA\"},{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data HRH access\",\"id\":\"seh1e61fwp1\"},{\"name\":\"Data HRH admin\",\"id\":\"ik8m9tx6QEw\"},{\"name\":\"Data MER access\",\"id\":\"c6hGi8GEZot\"},{\"name\":\"Data MOH access\",\"id\":\"OoiLAfMTyMx\"},{\"name\":\"Data SaSR access\",\"id\":\"CwFniyubXbx\"},{\"name\":\"Data SIMS access\",\"id\":\"iuD8wUFz95X\"},{\"name\":\"Global users\",\"id\":\"gh9tn4QBbKZ\"}]}"), + date = structure(1644857877, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 3.6e-05, + connect = 3.7e-05, pretransfer = 9.6e-05, starttransfer = 0.059701, + total = 0.06008)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-4a1b47.R b/tests/testthat/test.datim.org/api/userGroups.json-4a1b47.R new file mode 100644 index 00000000..ea6fe467 --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-4a1b47.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[d3E1aOVZZkZ,M9Uer9SioL7,e1HnTm7vg38,tTSFg9jRcIB,seh1e61fwp1,TRBfaInIiOK,zZ711zXQxw8,c6hGi8GEZot]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Thu, 03 Mar 2022 22:47:35 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0a3cc75485759de64d51b5be7cc06378c\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Thu, 03 Mar 2022 22:47:35 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0a3cc75485759de64d51b5be7cc06378c\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data DHI access\",\"id\":\"zZ711zXQxw8\"},{\"name\":\"Data ER access\",\"id\":\"M9Uer9SioL7\"},{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data HRH access\",\"id\":\"seh1e61fwp1\"},{\"name\":\"Data MCAE access\",\"id\":\"d3E1aOVZZkZ\"},{\"name\":\"Data MER access\",\"id\":\"c6hGi8GEZot\"},{\"name\":\"Global Partner 618022149 user administrators - JHPIEGO CORPORATION\",\"id\":\"e1HnTm7vg38\"},{\"name\":\"Global Partner 618022149 users - JHPIEGO CORPORATION\",\"id\":\"tTSFg9jRcIB\"}]}"), + date = structure(1646347655, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4.2e-05, + connect = 4.3e-05, pretransfer = 0.000108, starttransfer = 0.055119, + total = 0.055179)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-75f467.R b/tests/testthat/test.datim.org/api/userGroups.json-75f467.R new file mode 100644 index 00000000..1e0f482b --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-75f467.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[o8ap0XE01bh,c6hGi8GEZot,zY2t7de7Jzz,TRBfaInIiOK]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Mon, 14 Feb 2022 16:57:57 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"099a995fbe39fb24f48dc135ffba21e13\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Mon, 14 Feb 2022 16:57:57 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"099a995fbe39fb24f48dc135ffba21e13\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data MER access\",\"id\":\"c6hGi8GEZot\"},{\"name\":\"Data MER Interagency entry\",\"id\":\"zY2t7de7Jzz\"},{\"name\":\"OU South Africa Interagency users\",\"id\":\"o8ap0XE01bh\"}]}"), + date = structure(1644857877, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 3.1e-05, + connect = 3.3e-05, pretransfer = 9.5e-05, starttransfer = 0.029896, + total = 0.029935)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-8738f0.R b/tests/testthat/test.datim.org/api/userGroups.json-8738f0.R new file mode 100644 index 00000000..50a991bb --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-8738f0.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[M9Uer9SioL7,seh1e61fwp1,G1O0MJgw8rs,XgctRYBpSiR,TRBfaInIiOK]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Thu, 03 Mar 2022 22:46:35 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0dcc3bf2cb4cc396322008aa72f8ee06c\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Thu, 03 Mar 2022 22:46:35 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0dcc3bf2cb4cc396322008aa72f8ee06c\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data ER access\",\"id\":\"M9Uer9SioL7\"},{\"name\":\"Data ER entry\",\"id\":\"XgctRYBpSiR\"},{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data HRH access\",\"id\":\"seh1e61fwp1\"},{\"name\":\"Global Agency USAID users\",\"id\":\"G1O0MJgw8rs\"}]}"), + date = structure(1646347595, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4.9e-05, + connect = 5.2e-05, pretransfer = 0.000121, starttransfer = 0.065243, + total = 0.06533)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-8f3e5b.R b/tests/testthat/test.datim.org/api/userGroups.json-8f3e5b.R new file mode 100644 index 00000000..673a2370 --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-8f3e5b.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[M9Uer9SioL7,gh9tn4QBbKZ,CwFniyubXbx,OoiLAfMTyMx,seh1e61fwp1,iuD8wUFz95X,ik8m9tx6QEw,TRBfaInIiOK,SBtczqnORYA,c6hGi8GEZot]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Thu, 03 Mar 2022 22:46:47 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0d742cb8c9f97a1958904e684452feaee\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Thu, 03 Mar 2022 22:46:47 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0d742cb8c9f97a1958904e684452feaee\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data ER access\",\"id\":\"M9Uer9SioL7\"},{\"name\":\"Data ER admin\",\"id\":\"SBtczqnORYA\"},{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data HRH access\",\"id\":\"seh1e61fwp1\"},{\"name\":\"Data HRH admin\",\"id\":\"ik8m9tx6QEw\"},{\"name\":\"Data MER access\",\"id\":\"c6hGi8GEZot\"},{\"name\":\"Data MOH access\",\"id\":\"OoiLAfMTyMx\"},{\"name\":\"Data SaSR access\",\"id\":\"CwFniyubXbx\"},{\"name\":\"Data SIMS access\",\"id\":\"iuD8wUFz95X\"},{\"name\":\"Global users\",\"id\":\"gh9tn4QBbKZ\"}]}"), + date = structure(1646347607, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4.5e-05, + connect = 4.7e-05, pretransfer = 0.00012, starttransfer = 0.071054, + total = 0.071125)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-ce03a5.R b/tests/testthat/test.datim.org/api/userGroups.json-ce03a5.R new file mode 100644 index 00000000..f66643aa --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-ce03a5.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[zY2t7de7Jzz,TRBfaInIiOK,o8ap0XE01bh,c6hGi8GEZot]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Thu, 03 Mar 2022 22:46:56 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"099a995fbe39fb24f48dc135ffba21e13\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Thu, 03 Mar 2022 22:46:56 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"099a995fbe39fb24f48dc135ffba21e13\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data ESOP access\",\"id\":\"TRBfaInIiOK\"},{\"name\":\"Data MER access\",\"id\":\"c6hGi8GEZot\"},{\"name\":\"Data MER Interagency entry\",\"id\":\"zY2t7de7Jzz\"},{\"name\":\"OU South Africa Interagency users\",\"id\":\"o8ap0XE01bh\"}]}"), + date = structure(1646347616, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 4.2e-05, + connect = 4.3e-05, pretransfer = 0.000104, starttransfer = 0.048239, + total = 0.048313)), class = "response") diff --git a/tests/testthat/test.datim.org/api/userGroups.json-fd1704.R b/tests/testthat/test.datim.org/api/userGroups.json-fd1704.R new file mode 100644 index 00000000..9870af5b --- /dev/null +++ b/tests/testthat/test.datim.org/api/userGroups.json-fd1704.R @@ -0,0 +1,24 @@ +structure(list(url = "https://test.datim.org/api/userGroups.json?paging=false&filter=id:in:[zZ711zXQxw8]&fields=id,name", + status_code = 200L, headers = structure(list(server = "nginx", + date = "Mon, 14 Feb 2022 16:57:59 GMT", `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0fbdb198f1dfbb635d20a59395e181ed5\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")), all_headers = list(list(status = 200L, version = "HTTP/2", + headers = structure(list(server = "nginx", date = "Mon, 14 Feb 2022 16:57:59 GMT", + `content-type` = "application/json;charset=UTF-8", + `cache-control` = "no-cache, private", etag = "W/\"0fbdb198f1dfbb635d20a59395e181ed5\"", + `x-content-type-options` = "nosniff", `x-xss-protection` = "1; mode=block", + `x-frame-options` = "SAMEORIGIN", `x-frame-options` = "SAMEORIGIN", + `strict-transport-security` = "max-age=63072000; includeSubdomains; preload", + `content-encoding` = "gzip"), class = c("insensitive", + "list")))), cookies = structure(list(domain = "#HttpOnly_test.datim.org", + flag = FALSE, path = "/", secure = TRUE, expiration = structure(Inf, class = c("POSIXct", + "POSIXt")), name = "JSESSIONID", value = "REDACTED"), row.names = c(NA, + -1L), class = "data.frame"), content = charToRaw("{\"userGroups\":[{\"name\":\"Data DHI access\",\"id\":\"zZ711zXQxw8\"}]}"), + date = structure(1644857879, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.4e-05, + connect = 2.5e-05, pretransfer = 7.6e-05, starttransfer = 0.026214, + total = 0.026274)), class = "response") diff --git a/vignettes/Introduction-to-datimutils.Rmd b/vignettes/Introduction-to-datimutils.Rmd index b693ab1d..b32d616b 100644 --- a/vignettes/Introduction-to-datimutils.Rmd +++ b/vignettes/Introduction-to-datimutils.Rmd @@ -124,7 +124,7 @@ print(data) tabl <- " | datimutils function | DATIM Source | |----------------------------------------------------------------|:--------------------------:| -| getCategories | categories | +| getCategories | categories | | getCatCombos | categoryCombinations | | getCatOptionCombos | categoryOptionCombinations | | getCatOptionGroupSets | categoryOptionGroupSets | @@ -145,6 +145,7 @@ tabl <- " | getOrgUnitGroups | organisationUnitGroups | | getOrgUnits | organisationUnits | | getDimensions | dimensions | +| getUserGroups | userGroups | " cat(tabl) ```