httr
Browse files
globals.R
CHANGED
@@ -80,10 +80,13 @@ summarize_a3 <- function(x) {
|
|
80 |
#'
|
81 |
#' @param repo_owner The owner of the GitHub repository
|
82 |
#' @param repo_name The name of the GitHub repository
|
|
|
83 |
#' @return A data frame with file names and download URLs
|
|
|
84 |
#' @examples
|
85 |
#' files <- get_github_files("rtemis-org", "seq-data")
|
86 |
#' @export
|
|
|
87 |
#' @import httr
|
88 |
#' @import jsonlite
|
89 |
|
@@ -100,7 +103,7 @@ get_github_files <- function(repo_owner, repo_name, verbosity = 1) {
|
|
100 |
# Check if the request was successful
|
101 |
if (response[["status_code"]] == 200) {
|
102 |
# Extract the file information
|
103 |
-
files_data <- content(response, as = "text", encoding = "UTF-8") |> jsonlite::fromJSON()
|
104 |
|
105 |
# Create a data frame with file names and download URLs
|
106 |
files_df <- data.frame(
|
|
|
80 |
#'
|
81 |
#' @param repo_owner The owner of the GitHub repository
|
82 |
#' @param repo_name The name of the GitHub repository
|
83 |
+
#'
|
84 |
#' @return A data frame with file names and download URLs
|
85 |
+
#'
|
86 |
#' @examples
|
87 |
#' files <- get_github_files("rtemis-org", "seq-data")
|
88 |
#' @export
|
89 |
+
#' @author EDG
|
90 |
#' @import httr
|
91 |
#' @import jsonlite
|
92 |
|
|
|
103 |
# Check if the request was successful
|
104 |
if (response[["status_code"]] == 200) {
|
105 |
# Extract the file information
|
106 |
+
files_data <- httr::content(response, as = "text", encoding = "UTF-8") |> jsonlite::fromJSON()
|
107 |
|
108 |
# Create a data frame with file names and download URLs
|
109 |
files_df <- data.frame(
|