diff --git a/DESCRIPTION b/DESCRIPTION index 83d490f..cb1f113 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,7 @@ Description: Binding to Funz parametric computing envi Also provide function to deal with Funz setup (eg. install plugin/binding to simulation software, algorithms, ...). License: Apache License (>= 2) Encoding: UTF-8 -Imports: rJava (>= 1.0-0), Rserve (>= 1.8), xml2, utils, foreach, parallel, processx, gh +Imports: rJava (>= 1.0-0), Rserve (>= 1.8), xml2, utils, foreach, parallel, processx, curl, jsonlite SystemRequirements: Java (>= 8) URL: https://github.com/Funz/Funz.R RoxygenNote: 7.2.3 diff --git a/R/install.R b/R/install.R index 39e31c3..a8d7de7 100644 --- a/R/install.R +++ b/R/install.R @@ -74,7 +74,8 @@ installed.Models <- function() { #' } available.Models <- function(refresh_repo = F) { if (refresh_repo | any(is.na(.github_repos))) - .github_repos <- gh::gh("/orgs/Funz/repos",.token=NA, per_page=100) + .github_repos <- jsonlite::fromJSON(readLines(curl::curl("https://api.github.com/orgs/Funz/repos?per_page=100"))) + # not working behind some proxy: gh::gh("/orgs/Funz/repos",.token=NA, per_page=100) gsub("plugin-","", unlist(lapply(.github_repos, @@ -270,7 +271,8 @@ installed.Designs <- function() { #' } available.Designs <- function(refresh_repo = F) { if (refresh_repo | any(is.na(.github_repos))) - .github_repos <- gh::gh("/orgs/Funz/repos",.token=NA, per_page=100) + .github_repos <- jsonlite::fromJSON(readLines(curl::curl("https://api.github.com/orgs/Funz/repos?per_page=100"))) + # not working behind some proxy: gh::gh("/orgs/Funz/repos",.token=NA, per_page=100) gsub("algorithm-","", unlist(lapply(.github_repos,