From 863e1d0b664867d30802816c51f45b33692cc3ec Mon Sep 17 00:00:00 2001 From: ROBERT PATRICK CAREY III Date: Tue, 29 Oct 2019 14:28:06 -0400 Subject: [PATCH] Updated README.md --- README.Rmd | 7 ++++++- README.md | 14 +++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.Rmd b/README.Rmd index 750352d..eea1965 100644 --- a/README.Rmd +++ b/README.Rmd @@ -134,7 +134,12 @@ Stored statements can be retreived from Learning Locker by using the `retrieve` ###### app.R ```{r} -response <- rlocker::retrieve(interface = "connection", model = "statement", query = "first=1", asJSON = TRUE) +response <- rlocker::retrieve( + interface = "connection", + model = "statement", + query = "first=1", + asJSON = TRUE +) print(response) ``` diff --git a/README.md b/README.md index 35706b8..9863554 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Learning Locker xAPI support for Shiny Applications. 2. Your application is running in an environment that supports [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS); - otherwise api requests will be blocked. Requests made from + otherwise API requests will be blocked. Requests made from `localhost` / `127.0.0.1` / RStudio’s `runApp()` are often blocked for this reason. 3. You are given consent by the application user(s) to collect activity @@ -134,18 +134,22 @@ JavaScript implementations. ### Data Retreival Stored statements can be retreived from Learning Locker by using the -`retrieve()` method. +`retrieve` method. **Note**: This requires a connection to be established by the R-handler -to work; JS implementations can interface with the api through [HTTP -GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) / +to work; JS implementations can interface with the API through [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest) instead. ###### app.R ``` r -response <- rlocker::retrieve(interface = "connection", model = "statement", query = "first=1", asJSON = TRUE) +response <- rlocker::retrieve( + interface = "connection", + model = "statement", + query = "first=1", + asJSON = TRUE +) print(response) ```