Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Commit

Permalink
Merge pull request #27 from janeklb/update-26-public-addFilter
Browse files Browse the repository at this point in the history
Updates StatementClient's addFilter method to have public visibility …
  • Loading branch information
ljwolford authored Dec 23, 2016
2 parents d5449a3 + 0719512 commit 48316af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ filterByRegistration
filterBySince
filterByUntil
```

In addition to these preset filters, you can add non-standard filters to the statements query by using `addFilter`. For example:
```java
client.addFilter('context.extensions.yourExtension', 'customExtensionValue').getStatements();
```

These filters can be chained together to created more complex queries, such as

```java
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gov/adlnet/xapi/client/StatementClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public Statement getVoided(String statementId) throws java.io.IOException {
return this.getDecoder().fromJson(result, Statement.class);
}

private StatementClient addFilter(String key, String value) {
public StatementClient addFilter(String key, String value) {
try {
StatementClient client = new StatementClient(this._host,
this.username, this.password);
Expand Down

0 comments on commit 48316af

Please sign in to comment.