Adds group suggestions into ListGroups REST API.

This is a different approach of
Ie86de1f73ccd7bdec041730d95301d6aa3bdbdc4. This allows group
auto completion to be used in a plugin's UI.

Change-Id: Ia1cfa068246127c29f1b74f6aa4562a9167c301e
This commit is contained in:
Yuxuan 'fishy' Wang
2015-09-08 17:53:23 -07:00
parent b5032e1aef
commit 8c48525834
6 changed files with 173 additions and 44 deletions

View File

@@ -63,6 +63,7 @@ public interface Groups {
private int limit;
private int start;
private String substring;
private String suggest;
public List<GroupInfo> get() throws RestApiException {
Map<String, GroupInfo> map = getAsMap();
@@ -128,6 +129,11 @@ public interface Groups {
return this;
}
public ListRequest withSuggest(String suggest) {
this.suggest = suggest;
return this;
}
public EnumSet<ListGroupsOption> getOptions() {
return options;
}
@@ -163,5 +169,9 @@ public interface Groups {
public String getSubstring() {
return substring;
}
public String getSuggest() {
return suggest;
}
}
}