Open rburghol opened 2 years ago
ds <- RomDataSource$new(site, rest_uname) ds$get_token(rest_pw) # post a file vahydro_post_metric_to_scenprop(scenprop$pid, 'external_file', remote_url, 'logfile', NA, ds) #scenprop$pid, , NULL, , wd_mgd if (is.null(met.propcode)) { met.propcode <- '' } metprop <- RomProperty$new( ds, metinfo <- list( varkey = 'om_class_Constant', propname = 'wd_mgd', featureid = as.integer(scenprop$pid), entity_type = "dh_properties", bundle = "dh_properties" ), TRUE ) metprop$propcode <- as.character(met.propcode) metprop$propvalue <- as.numeric(met.value) metprop$save(TRUE) img_prop <- RomProperty$new( ds, list( varkey = 'dh_image_file', propname="mllr_plot", featureid=ts$tid, entity_type="dh_timeseries", bundle='dh_properties' ),TRUE ) # now add the image img_prop$propcode <- furl img_prop$save(TRUE)