opendatabio / opendatabio-r

R package for interacting with OpenDataBio
https://opendatabio.gitlab.io/
GNU General Public License v3.0
3 stars 2 forks source link

create obd_import_measurements #26

Closed birutaibm closed 6 years ago

birutaibm commented 6 years ago

@andrechalom we are ready to support the inclusion of this method. I think it will be like bellow, but I don't know how to do it locally

#' @export 
#' @rdname functions
odb_import_measurements <- function(data, odb_cfg = odb_config(), common = list()) {
    response = odb_send_post(data, odb_cfg, "measurements", common)
    id = fromJSON(toJSON(content(response)))$userjob
    # Wait a second so that the job may start processing
    Sys.sleep(1)
    return (odb_get_jobs(list(id = id), odb_cfg))
}

Please, add it to me.

andrechalom commented 6 years ago

Done, thanks!