diff --git a/DESCRIPTION b/DESCRIPTION index cff10df..026a540 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: d4storagehub4R -Version: 0.4-2 -Date: 2022-11-29 +Version: 0.4-3 +Date: 2023-03-01 Title: Interface to 'D4Science' 'StorageHub' API Authors@R: c( person("Emmanuel", "Blondel", role = c("aut", "cre"), email = "emmanuel.blondel1@gmail.com", comment = c(ORCID = "0000-0002-5870-5762"))) diff --git a/NEWS.md b/NEWS.md index b49857d..4e57712 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +## [d4storagehub4R 0.4-3](https://cran.r-project.org/package=d4storagehub4R) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-unavailable-red.svg)](https://cran.r-project.org/package=d4storagehub4R) + +**Enhancements** + +* [#16](https://github.com/eblondel/d4storagehub4R/issues/16) fetchUserProfile should not show verbose curl logs if logger is not DEBUG + ## [d4storagehub4R 0.4-2](https://cran.r-project.org/package=d4storagehub4R) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://cran.r-project.org/package=d4storagehub4R) **New features** diff --git a/R/StoragehubManager.R b/R/StoragehubManager.R index 82f53d7..91cc233 100644 --- a/R/StoragehubManager.R +++ b/R/StoragehubManager.R @@ -112,11 +112,19 @@ StoragehubManager <- R6Class("StoragehubManager", user_profile_req <- switch(private$token_type, "gcube" = { user_profile_url = paste0(private$url_homelibrary, "/people/profile?gcube-token=", self$getToken()) - httr::GET(user_profile_url) + if(!self$verbose.debug){ + httr::GET(user_profile_url) + }else{ + httr::with_verbose(httr::GET(user_profile_url)) + } }, "jwt" = { user_profile_url = paste0(private$url_homelibrary, "/people/profile") - httr::with_verbose(httr::GET(user_profile_url, httr::add_headers("Authorization" = paste("Bearer", self$getToken())))) + if(!self$verbose.debug){ + httr::GET(user_profile_url, httr::add_headers("Authorization" = paste("Bearer", self$getToken()))) + }else{ + httr::with_verbose(httr::GET(user_profile_url, httr::add_headers("Authorization" = paste("Bearer", self$getToken())))) + } } ) diff --git a/README.md b/README.md index d28a1b1..c57360f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Build Status](https://github.com/eblondel/d4storagehub4R/actions/workflows/r-cmd-check.yml/badge.svg?branch=master)](https://github.com/eblondel/d4storagehub4R/actions/workflows/r-cmd-check.yml) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/d4storagehub4R)](https://cran.r-project.org/package=d4storagehub4R) [![cran checks](https://cranchecks.info/badges/worst/d4storagehub4R)](https://cran.r-project.org/web/checks/check_results_d4storagehub4R.html) -[![Github_Status_Badge](https://img.shields.io/badge/Github-0.4--1-blue.svg)](https://github.com/eblondel/d4storagehub4R) +[![Github_Status_Badge](https://img.shields.io/badge/Github-0.4--3-blue.svg)](https://github.com/eblondel/d4storagehub4R) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5496998.svg)](https://doi.org/10.5281/zenodo.5496998) **d4storagehub4R – R Interface to 'D4Science' 'StorageHub' API**