Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rpc5102 committed Oct 29, 2019
1 parent 70395bd commit 863e1d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
7 changes: 6 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
```
Expand Down

0 comments on commit 863e1d0

Please sign in to comment.