Giter Site home page Giter Site logo

Revisions returned incorrectly about rdrop2 HOT 1 CLOSED

karthik avatar karthik commented on May 26, 2024
Revisions returned incorrectly

from rdrop2.

Comments (1)

scheidec avatar scheidec commented on May 26, 2024

Upon further investigation, it seems there are actually 15 columns returned from the drop_history function when the is_deleted column is true. The last column, is_deleted is either missing or true. When missing, the observation only has 14 variables. But when creating the datatable in the last line here:

drop_history <- function(path = NULL, dtoken = get_dropbox_token()) {
    rev_url <- "https://api.dropbox.com/1/revisions/auto/"
    assert_that(!is.null(path))
    rev_url <- paste0(rev_url, strip_slashes(path))
    res <- httr::GET(rev_url, , config(token = dtoken))
    httr::stop_for_status(res)
    results <- httr::content(res)
    res_df <- lapply(results, function(x) data.frame(t(unlist(x)), stringsAsFactors = FALSE))
    data.table::rbindlist(res_df, fill = TRUE)
}

it results in a dataframe with 15 columns if some of the observations have is_deleted as TRUE.

Is the expect_equal(ncol(x), 14) just checking to make sure that no files have been deleted?

Note: is_deleted is metadata that will be changing in v2:
https://www.dropbox.com/developers/reference/migration-guide#metadata-mapping

from rdrop2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.