info.bliki.api.query.OpenSearch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bliki-core Show documentation
Show all versions of bliki-core Show documentation
This is the core project.
The newest version!
package info.bliki.api.query;
/**
* action=opensearch
This module implements OpenSearch protocol
*
*
* Parameters:
* search - Search string
* limit - Maximum amount of results to return
* No more than 100 (100 for bots) allowed.
* Default: 10
* namespace - Namespaces to search
* Values (separate with '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8,
* 9, 10, 11, 12, 13, 14, 15, 100, 101 Default: 0
* format -
*
*
*
* Example: api.php?action=opensearch&search=Te
*
*
*/
public class OpenSearch extends RequestBuilder {
public OpenSearch() {
super();
action("opensearch");
}
public OpenSearch search(String search) {
put("search", search);
return this;
}
public static OpenSearch create() {
return new OpenSearch();
}
public OpenSearch limit(int limit) {
put("limit", Integer.toString(limit));
return this;
}
/**
* namespace - a Namespace to search
Values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
* 10, 11, 12, 13, 14, 15, 100, 101 Default: 0
*
* @param namespaces
* @return
*/
public OpenSearch namespace(int namespace) {
put("namespace", Integer.toString(namespace));
return this;
}
/**
* namespace - Namespaces to search
Values (internally separated with
* '|'): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101
* Default: 0
*
* @param namespaces
* @return
*/
public OpenSearch namespace(int... namespaces) {
putPipedString("namespace", namespaces);
return this;
}
}