From 119171eb2cef7d9ec2f024b1541a74d46e5db43b Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Wed, 20 Jun 2018 18:12:55 -0400 Subject: [PATCH 01/13] boxr_misc : Added new functions for marker-based paging, while retaining offset-based paging methods. User can now set which one, but marker is the default. --- R/boxr_misc.R | 68 ++++++++++++++++++++++++++++++++++++++++++++++++--- man/box_ls.Rd | 5 +++- 2 files changed, 68 insertions(+), 5 deletions(-) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index 92d2da1e..977f2853 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -5,6 +5,7 @@ #' @param max Maximum number of entries to retrieve in total #' @param fields Specify what fields to query as a character vector. The default value NULL will return all possible columns: #' "modified_at" ,"content_modified_at", "name", "id", "type", "sha1" ,"size", "owned_by", "path_collection", "description" +#' @param pageMode Specify what type of pagination to use. According to the Box API, "Marker-based paging is the preferred method and is most performant.", and so 'marker' is the default. #' #' @return A data.frame describing the contents of the the folder specified by #' \code{dir_id}. Non recursive. @@ -17,18 +18,25 @@ #' examining the contents of local directories. #' #' @export -box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) { +box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, pageMode = 'marker') { # maybe some logic here to check that limit <= 1000 checkAuth() + assertthat::assert_that( + pageMode %in% c('marker', 'Marker', 'MARKER', 'offset', 'Offset', 'OFFSET'), + msg = paste("Mode must be either 'marker', or 'offset'. Default is marker.") + ) + + if(pageMode %in% c('marker', 'Marker', 'MARKER')){pageMode = "marker"}else{pageMode = "offset"} + url_root <- "https://api.box.com/2.0" url <- httr::parse_url( paste(url_root, "folders", box_id(dir_id), "items", sep = "/") ) - + fields_all <- c("modified_at" ,"content_modified_at", "name", "id", "type", "sha1" ,"size", "owned_by", "path_collection", "description") @@ -47,7 +55,10 @@ box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) limit = limit ) - out <- box_pagination(url, max = max) + out = switch(pageMode, + "offset" = box_paginate_offset(url = url, max = max), + "marker" = box_paginate_marker(url = url, max = max) + ) class(out) <- "boxr_object_list" return(out) @@ -55,7 +66,55 @@ box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) #' @keywords internal -box_pagination <- function(url, max = 200) { +box_paginate_marker = function(url, max){ + + out = list() + + marker = character(0) + + n_so_far = 0 + + out = list() + + url$query$usemarker = T + + while(!is.null(marker)){ + + req = httr::GET( + url, + httr::config(token = getOption("boxr.token")) + ) + + if (req$status_code == 404) { + message("box.com indicates that no results were found") + return() + } + + httr::stop_for_status(req) + + resp = httr::content(req) + + n_req <- length(resp$entries) + n_so_far <- n_so_far + n_req + + out = c(out, resp$entries) + + marker = resp$next_marker + + url$query$marker = marker + + n_so_far = n_so_far + 1 + + if(n_so_far >= max){return(out)} + + } + + return(out) + +} + +#' @keywords internal +box_paginate_offset = function(url, max){ out <- list() next_page <- TRUE @@ -93,6 +152,7 @@ box_pagination <- function(url, max = 200) { } return(out) + } diff --git a/man/box_ls.Rd b/man/box_ls.Rd index 3a366f49..3de9e042 100644 --- a/man/box_ls.Rd +++ b/man/box_ls.Rd @@ -4,7 +4,8 @@ \alias{box_ls} \title{Obtain a data.frame describing the contents of a box.com folder} \usage{ -box_ls(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) +box_ls(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, + pageMode = "marker") } \arguments{ \item{dir_id}{The box.com id for the folder that you'd like to query} @@ -15,6 +16,8 @@ box_ls(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) \item{fields}{Specify what fields to query as a character vector. The default value NULL will return all possible columns: "modified_at" ,"content_modified_at", "name", "id", "type", "sha1" ,"size", "owned_by", "path_collection", "description"} + +\item{pageMode}{Specify what type of pagination to use. According to the Box API, "Marker-based paging is the preferred method and is most performant.", and so 'marker' is the default.} } \value{ A data.frame describing the contents of the the folder specified by From d41a721995884afe4647d006a257fdf05e48a86d Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Wed, 20 Jun 2018 18:17:05 -0400 Subject: [PATCH 02/13] added another 9 to the version # --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index f6c76317..cf62582b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: boxr Type: Package Title: Interface for the 'Box.com API' -Version: 0.3.4.99999 +Version: 0.3.4.999999 Authors@R: c( person("Ian", "Lyttle", email = "ian.lyttle@schneider-electric.com", role = c("aut", "cre")), From e08267335972adb3445b658ef0f5bffbc8b8ebf0 Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Wed, 20 Jun 2018 18:54:28 -0400 Subject: [PATCH 03/13] boxr_misc : removed bug ; n_so_far was being incremented twice. --- R/boxr_misc.R | 2 -- 1 file changed, 2 deletions(-) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index cd8ea131..33e9c6ee 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -104,8 +104,6 @@ box_paginate_marker = function(url, max){ url$query$marker = marker - n_so_far = n_so_far + 1 - if(n_so_far >= max){return(out)} } From 49552f9dfc3898c27f423e9515192e3ec7075ff5 Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Wed, 20 Jun 2018 20:27:04 -0400 Subject: [PATCH 04/13] documented changes to boxr_misc --- R/boxr_misc.R | 33 +++++++++++++++++++-------------- man/box_ls.Rd | 20 +++++++++++++------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index 33e9c6ee..a91478a4 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -1,23 +1,28 @@ #' Obtain a data.frame describing the contents of a box.com folder -#' +#' #' @param dir_id The box.com id for the folder that you'd like to query #' @param limit Maximum number of entries to retrieve per query-page #' @param max Maximum number of entries to retrieve in total -#' @param fields Specify what fields to query as a character vector. -#' The default value NULL will return all possible columns: -#' `"modified_at"`, `"content_modified_at"`, `"name"`, `"id"`, `"type"`, -#' `"sha1"` ,`"size"`, `"owned_by"`, `"path_collection"`, `"description"` -#' -#' @return A data.frame describing the contents of the the folder specified by +#' @param fields Specify what fields to query as a character vector. The default +#' value NULL will return all possible columns: `"modified_at"`, +#' `"content_modified_at"`, `"name"`, `"id"`, `"type"`, `"sha1"` ,`"size"`, +#' `"owned_by"`, `"path_collection"`, `"description"` +#' @param pageMode Specify the method for pagination. The default is +#' marker-based pagination, but offset-based pagination is available. With +#' marker-based pagination, total file counts are unavailable, but querying +#' more than 300,000 files is allowed. Offset-based pagination does not allow +#' more than 300,000 files to be queried. +#' +#' @return A data.frame describing the contents of the the folder specified by #' `dir_id`. Non recursive. -#' -#' @author Brendan Rocks \email{foss@@brendanrocks.com} and Ian Lyttle +#' +#' @author Brendan Rocks \email{foss@@brendanrocks.com} and Ian Lyttle #' \email{ian.lyttle@@schneider-electric.com} -#' -#' @seealso [box_fetch()] and [box_push()] for synchronizing -#' the contents of local and remote directories. [list.files()] for -#' examining the contents of local directories. -#' +#' +#' @seealso [box_fetch()] and [box_push()] for synchronizing the contents of +#' local and remote directories. [list.files()] for examining the contents of +#' local directories. +#' #' @export box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, pageMode = 'marker') { diff --git a/man/box_ls.Rd b/man/box_ls.Rd index dbfbaa7d..8a2e53da 100644 --- a/man/box_ls.Rd +++ b/man/box_ls.Rd @@ -14,10 +14,16 @@ box_ls(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, \item{max}{Maximum number of entries to retrieve in total} -\item{fields}{Specify what fields to query as a character vector. -The default value NULL will return all possible columns: -\code{"modified_at"}, \code{"content_modified_at"}, \code{"name"}, \code{"id"}, \code{"type"}, -\code{"sha1"} ,\code{"size"}, \code{"owned_by"}, \code{"path_collection"}, \code{"description"}} +\item{fields}{Specify what fields to query as a character vector. The default +value NULL will return all possible columns: \code{"modified_at"}, +\code{"content_modified_at"}, \code{"name"}, \code{"id"}, \code{"type"}, \code{"sha1"} ,\code{"size"}, +\code{"owned_by"}, \code{"path_collection"}, \code{"description"}} + +\item{pageMode}{Specify the method for pagination. The default is +marker-based pagination, but offset-based pagination is available. With +marker-based pagination, total file counts are unavailable, but querying +more than 300,000 files is allowed. Offset-based pagination does not allow +more than 300,000 files to be queried.} } \value{ A data.frame describing the contents of the the folder specified by @@ -27,9 +33,9 @@ A data.frame describing the contents of the the folder specified by Obtain a data.frame describing the contents of a box.com folder } \seealso{ -\code{\link[=box_fetch]{box_fetch()}} and \code{\link[=box_push]{box_push()}} for synchronizing -the contents of local and remote directories. \code{\link[=list.files]{list.files()}} for -examining the contents of local directories. +\code{\link[=box_fetch]{box_fetch()}} and \code{\link[=box_push]{box_push()}} for synchronizing the contents of +local and remote directories. \code{\link[=list.files]{list.files()}} for examining the contents of +local directories. } \author{ Brendan Rocks \email{foss@brendanrocks.com} and Ian Lyttle From c097ea91fd00341f3a9c0c5d3fe9ec6b56220b7e Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Mon, 25 Jun 2018 23:45:49 -0400 Subject: [PATCH 05/13] Edited version number to remain unchanged. --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index cf62582b..f6c76317 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: boxr Type: Package Title: Interface for the 'Box.com API' -Version: 0.3.4.999999 +Version: 0.3.4.99999 Authors@R: c( person("Ian", "Lyttle", email = "ian.lyttle@schneider-electric.com", role = c("aut", "cre")), From dfadbe93bdab2535abb69d1d6a3c6a53c0af8ce0 Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Mon, 25 Jun 2018 23:46:54 -0400 Subject: [PATCH 06/13] Removed offset-based pagination, and all of the associated variables and arguments. Pagination function is now once again `box_pagination()`. Warning emitted when limit > 1000 Other minor changes as requested. --- R/boxr_misc.R | 86 ++++++++------------------------------------------- 1 file changed, 13 insertions(+), 73 deletions(-) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index a91478a4..87dea370 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -7,11 +7,6 @@ #' value NULL will return all possible columns: `"modified_at"`, #' `"content_modified_at"`, `"name"`, `"id"`, `"type"`, `"sha1"` ,`"size"`, #' `"owned_by"`, `"path_collection"`, `"description"` -#' @param pageMode Specify the method for pagination. The default is -#' marker-based pagination, but offset-based pagination is available. With -#' marker-based pagination, total file counts are unavailable, but querying -#' more than 300,000 files is allowed. Offset-based pagination does not allow -#' more than 300,000 files to be queried. #' #' @return A data.frame describing the contents of the the folder specified by #' `dir_id`. Non recursive. @@ -24,19 +19,14 @@ #' local directories. #' #' @export -box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, pageMode = 'marker') { +box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) { - # maybe some logic here to check that limit <= 1000 + if(limit > 1000){ + warning("The maximum limit is 1000; box_ls is using 1000.") + } checkAuth() - - assertthat::assert_that( - pageMode %in% c('marker', 'Marker', 'MARKER', 'offset', 'Offset', 'OFFSET'), - msg = paste("Mode must be either 'marker', or 'offset'. Default is marker.") - ) - - if(pageMode %in% c('marker', 'Marker', 'MARKER')){pageMode = "marker"}else{pageMode = "offset"} - + url_root <- "https://api.box.com/2.0" url <- httr::parse_url( @@ -61,10 +51,7 @@ box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, limit = limit ) - out = switch(pageMode, - "offset" = box_paginate_offset(url = url, max = max), - "marker" = box_paginate_marker(url = url, max = max) - ) + out = box_pagination(url = url, max = max) class(out) <- "boxr_object_list" return(out) @@ -72,19 +59,15 @@ box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, #' @keywords internal -box_paginate_marker = function(url, max){ - - out = list() - +box_pagination = function(url, max){ + marker = character(0) - n_so_far = 0 - out = list() + url$query$usemarker = TRUE + next_page = TRUE - url$query$usemarker = T - - while(!is.null(marker)){ + while(next_page){ req = httr::GET( url, @@ -106,60 +89,17 @@ box_paginate_marker = function(url, max){ out = c(out, resp$entries) marker = resp$next_marker - - url$query$marker = marker - - if(n_so_far >= max){return(out)} - - } - - return(out) - -} -#' @keywords internal -box_paginate_offset = function(url, max){ - - out <- list() - next_page <- TRUE - page <- 1 - n_so_far <- 0 - - while (next_page) { - - limit <- url$query$limit - - url$query$offset <- as.integer((page - 1) * limit) + if(is.null(marker)){next_page = FALSE}else{url$query$marker = marker} - req <- httr::GET( - url, - httr::config(token = getOption("boxr.token")) - ) - - if (req$status_code == 404) { - message("box.com indicates that no results were found") - return() - } - - httr::stop_for_status(req) - - resp <- httr::content(req) - n_req <- length(resp$entries) - n_so_far <- n_so_far + n_req - total <- resp$total_count - - if (!n_so_far < total | n_so_far >= max) - next_page <- FALSE + if(n_so_far >= max){return(out)} - out <- c(out, resp$entries) - page <- page + 1 } return(out) } - #' Get/Set Default box.com directory/folder #' #' @description Providing analgous functionality for the jbase **`R`** From 7cf9e4093c7d92195d72df8090dc15794dc6a528 Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Mon, 25 Jun 2018 23:54:09 -0400 Subject: [PATCH 07/13] documented --- man/box_ls.Rd | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/man/box_ls.Rd b/man/box_ls.Rd index 8a2e53da..df39702e 100644 --- a/man/box_ls.Rd +++ b/man/box_ls.Rd @@ -4,8 +4,7 @@ \alias{box_ls} \title{Obtain a data.frame describing the contents of a box.com folder} \usage{ -box_ls(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, - pageMode = "marker") +box_ls(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) } \arguments{ \item{dir_id}{The box.com id for the folder that you'd like to query} @@ -18,12 +17,6 @@ box_ls(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL, value NULL will return all possible columns: \code{"modified_at"}, \code{"content_modified_at"}, \code{"name"}, \code{"id"}, \code{"type"}, \code{"sha1"} ,\code{"size"}, \code{"owned_by"}, \code{"path_collection"}, \code{"description"}} - -\item{pageMode}{Specify the method for pagination. The default is -marker-based pagination, but offset-based pagination is available. With -marker-based pagination, total file counts are unavailable, but querying -more than 300,000 files is allowed. Offset-based pagination does not allow -more than 300,000 files to be queried.} } \value{ A data.frame describing the contents of the the folder specified by From 3f81867a7796d388aa41bcb8a97047547ffabd00 Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Tue, 26 Jun 2018 00:23:56 -0400 Subject: [PATCH 08/13] boxr_misc : Adjusted boxr_ls warning to change limit > 1000 to limit = 1000. --- R/boxr_misc.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index 87dea370..ffbe86b0 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -23,6 +23,7 @@ box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) if(limit > 1000){ warning("The maximum limit is 1000; box_ls is using 1000.") + limit = 1000 } checkAuth() From 0742bee9962e5c2002da0e7b5ce646f5c74fce61 Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Fri, 13 Jul 2018 18:54:46 -0400 Subject: [PATCH 09/13] boxr_misc.R : Adjusted assignment operator from `=` to `<-`. Also added myself to authors. --- R/boxr_misc.R | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index ffbe86b0..b99a7f43 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -11,8 +11,8 @@ #' @return A data.frame describing the contents of the the folder specified by #' `dir_id`. Non recursive. #' -#' @author Brendan Rocks \email{foss@@brendanrocks.com} and Ian Lyttle -#' \email{ian.lyttle@@schneider-electric.com} +#' @author Brendan Rocks \email{foss@@brendanrocks.com}, Ian Lyttle +#' \email{ian.lyttle@@schneider-electric.com}, and Alec Wong \email{aw685@cornell.edu} #' #' @seealso [box_fetch()] and [box_push()] for synchronizing the contents of #' local and remote directories. [list.files()] for examining the contents of @@ -52,7 +52,7 @@ box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) limit = limit ) - out = box_pagination(url = url, max = max) + out <- box_pagination(url = url, max = max) class(out) <- "boxr_object_list" return(out) @@ -60,17 +60,17 @@ box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) #' @keywords internal -box_pagination = function(url, max){ +box_pagination <- function(url, max){ - marker = character(0) - n_so_far = 0 - out = list() - url$query$usemarker = TRUE - next_page = TRUE + marker <- character(0) + n_so_far <- 0 + out <- list() + url$query$usemarker <- TRUE + next_page <- TRUE while(next_page){ - req = httr::GET( + req <- httr::GET( url, httr::config(token = getOption("boxr.token")) ) @@ -82,14 +82,14 @@ box_pagination = function(url, max){ httr::stop_for_status(req) - resp = httr::content(req) + resp <- httr::content(req) n_req <- length(resp$entries) n_so_far <- n_so_far + n_req - out = c(out, resp$entries) + out <- c(out, resp$entries) - marker = resp$next_marker + marker <- resp$next_marker if(is.null(marker)){next_page = FALSE}else{url$query$marker = marker} From 2c5bd7fa281ff584ce2ee1a250f0651b8d4708ed Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Fri, 13 Jul 2018 19:00:45 -0400 Subject: [PATCH 10/13] boxr_misc.R : Adjusted formatting of control statements to adhere to package conventions --- R/boxr_misc.R | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index b99a7f43..9a370455 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -21,9 +21,9 @@ #' @export box_ls <- function(dir_id = box_getwd(), limit = 100, max = Inf, fields = NULL) { - if(limit > 1000){ + if (limit > 1000) { warning("The maximum limit is 1000; box_ls is using 1000.") - limit = 1000 + limit <- 1000 } checkAuth() @@ -68,32 +68,34 @@ box_pagination <- function(url, max){ url$query$usemarker <- TRUE next_page <- TRUE - while(next_page){ - + while (next_page) { + req <- httr::GET( url, httr::config(token = getOption("boxr.token")) - ) - + ) + if (req$status_code == 404) { message("box.com indicates that no results were found") return() - } - + } + httr::stop_for_status(req) - resp <- httr::content(req) - n_req <- length(resp$entries) n_so_far <- n_so_far + n_req - out <- c(out, resp$entries) - marker <- resp$next_marker - if(is.null(marker)){next_page = FALSE}else{url$query$marker = marker} + if (is.null(marker)) { + next_page <- FALSE + } else { + url$query$marker <- marker + } - if(n_so_far >= max){return(out)} + if (n_so_far >= max) { + return(out) + } } From 12834e4e9ddda3394bcd2706ec8ad264ecbdbcc3 Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Fri, 13 Jul 2018 19:02:51 -0400 Subject: [PATCH 11/13] boxr_misc.R : Upon 404 error, I made the message a little more explicit. One of my users attempted to connect to a shared folder that they were not a member of, and the additional information would have been helpful to isolate the problem from my end. --- R/boxr_misc.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/boxr_misc.R b/R/boxr_misc.R index 9a370455..2785d7e2 100644 --- a/R/boxr_misc.R +++ b/R/boxr_misc.R @@ -76,7 +76,7 @@ box_pagination <- function(url, max){ ) if (req$status_code == 404) { - message("box.com indicates that no results were found") + message("Error 404: box.com indicates that no results were found, or the folder specified does not exist in your account.") return() } From ffa2bd66fd4179160ea26d59f9bad6f19dfe440f Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Fri, 13 Jul 2018 19:03:42 -0400 Subject: [PATCH 12/13] Added Alec Wong to authors, documented. --- man/box_ls.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/box_ls.Rd b/man/box_ls.Rd index df39702e..b89938a9 100644 --- a/man/box_ls.Rd +++ b/man/box_ls.Rd @@ -31,6 +31,6 @@ local and remote directories. \code{\link[=list.files]{list.files()}} for examin local directories. } \author{ -Brendan Rocks \email{foss@brendanrocks.com} and Ian Lyttle -\email{ian.lyttle@schneider-electric.com} +Brendan Rocks \email{foss@brendanrocks.com}, Ian Lyttle +\email{ian.lyttle@schneider-electric.com}, and Alec Wong \email{aw685@cornell.edu} } From 87d9f9cb0338e866a1648225ae207b3b9e6f3ace Mon Sep 17 00:00:00 2001 From: Alec Wong Date: Fri, 13 Jul 2018 19:11:23 -0400 Subject: [PATCH 13/13] FIXES ISSUE #74 NEWS.md : Added to improvements list for PR #79. Added to bug fixes Issue #74 solution. --- NEWS.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index e511a511..c582ed40 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,13 +2,17 @@ ## Improvements +* converts pagination method from offset to marker-based paging (#79, @awong234) + * adds option to return specified `fields` in `box_ls()` (#72, @awong234) * adds updated screen shots (pngs in `images/`) and description for creating a Box App with the new Box Developer Console UI. Also added reference for `box_auth_on_attach` in step 4 'And you're done'. (#57, @nathancday) ## Bug Fixes -* fixes bug in `box_pagination()` to enforce integer for offset (#71, @awong234) +* `box_pagination()` refactored to employ marker-based paging instead of offset-based paging, avoiding a hard limit of 300,000 offset (#74, @awong234) + +* ~~fixes bug in `box_pagination()` to enforce integer for offset (#71, @awong234)~~ Deprecated, pagination now uses marker-based paging. * fixes bug in `box_search_files()` (#61, @j450h1)