R Under development (unstable) (2024-03-11 r86098 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(DatastreamR) > > # Login using Configuration > timeseriesClient = TimeSeriesClient$new('Config.ini') INFO [2024-03-13 10:17:39] DSConnect.R DSConnect$getToken :Getting Token and Token Expiry INFO [2024-03-13 10:17:39] DSConnect.R DSConnect$getJsonResponse Web response received > > testID = 'TSVVV023' > delResp = timeseriesClient$DeleteItem(testID) INFO [2024-03-13 10:17:39] DatastreamUserCreated_TimeSeries.R TimeSeriesClient$DeleteItem Deleting TSVVV023 INFO [2024-03-13 10:17:39] DSConnect.R DSConnect$getJsonResponse Web response received INFO [2024-03-13 10:17:39] DatastreamUserCreated_TimeSeries.R TimeSeriesClient$DeleteItem TSVVV023 returned a response > if (!is.null(delResp)) + { + if (delResp$ResponseStatus != DSUserObjectResponseStatus$UserObjectSuccess) + { + print(paste('Timeseries DeleteItem failed on', + delResp.UserObjectId, + 'with error', + names(DSUserObjectResponseStatus)[delResp$ResponseStatus + 1], + ':', delResp$ErrorMessage, '\n\n')) + } + else + print(paste('Timeseries', delResp$UserObjectId,'successfully deleted.', '\n\n')) + } [1] "Timeseries TSVVV023 successfully deleted. \n\n" > > proc.time() user system elapsed 0.82 0.15 1.10