From 9e15e1d3b6c760cc15274508207d81980bd19266 Mon Sep 17 00:00:00 2001 From: Conor Flynn Date: Fri, 28 Apr 2023 08:52:09 -0400 Subject: [PATCH] add sample call to DataEnginePrimaryFunctions --- R-Code-Samples/DataEnginePrimaryFunctions.Rmd | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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