You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
583 B
22 lines
583 B
package com.github.jreddit.request.retrieval.subreddits;
|
|
|
|
import com.github.jreddit.request.retrieval.ListingRequest;
|
|
|
|
public class SubredditsSearchRequest extends ListingRequest {
|
|
|
|
private static final String ENDPOINT_FORMAT = "/subreddits/search.json?%s";
|
|
|
|
/**
|
|
* @param query Search query (e.g. "programming")
|
|
*/
|
|
public SubredditsSearchRequest(String query) {
|
|
this.addParameter("q", query);
|
|
}
|
|
|
|
@Override
|
|
public String generateRedditURI() {
|
|
return String.format(ENDPOINT_FORMAT, this.generateParameters());
|
|
}
|
|
|
|
}
|