Edit search implementation, add method to get submission text

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-08-01 17:20:26 -04:00
parent 94f27f9e04
commit ead2077107
4 changed files with 65 additions and 113 deletions
+7
View File
@@ -86,10 +86,17 @@ func SortByTop(opts url.Values) {
}
// SortByRelevance sets the sort option to return the most relevant results first.
// This can be used when searching for subreddits and users.
func SortByRelevance(opts url.Values) {
opts.Set("sort", "relevance")
}
// SortByActivity sets the sort option to return results with the most activity first.
// This can be used when searching for subreddits and users.
func SortByActivity(opts url.Values) {
opts.Set("sort", "activity")
}
// SortByNumberOfComments sets the sort option to return the results with the highest
// number of comments first.
func SortByNumberOfComments(opts url.Values) {