diff --git a/R-Code-Samples/DataEnginePrimaryFunctions.Rmd b/R-Code-Samples/DataEnginePrimaryFunctions.Rmd index a665a4c..556a421 100644 --- a/R-Code-Samples/DataEnginePrimaryFunctions.Rmd +++ b/R-Code-Samples/DataEnginePrimaryFunctions.Rmd @@ -138,4 +138,17 @@ request <- function(protocol, properties = "", headers = "", startdate = "", end return(output) }) } +``` + +## Sample function call to the protocol graph-aave-borrows +```{r} +startdate <- "2022-01-01" +enddate <- "2022-01-04" + +# submit a request +graph.borrows <- request("graph-aave-borrows", "", "", startdate, enddate) +# for each request validate the code was successful +# if not the return the response with an empty dataframe +if(graph.borrows$response$code != 200) + return(graph.borrows) ``` \ No newline at end of file