Skip to content

Commit

Permalink
fix #16
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Mar 1, 2023
1 parent 82e7bf2 commit b40db51
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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")))
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
12 changes: 10 additions & 2 deletions R/StoragehubManager.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()))))
}
}
)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down

0 comments on commit b40db51

Please sign in to comment.