Add SearchService

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-05-04 20:51:16 -04:00
parent 014ecb6c16
commit dc31cd8dbc
5 changed files with 256 additions and 27 deletions
-20
View File
@@ -111,26 +111,6 @@ func (s *SubredditServiceOp) GetMineWhereStreams(ctx context.Context, opts *List
return s.getSubreddits(ctx, "subreddits/mine/contributor", opts)
}
type sort int
const (
sortHot sort = iota
sortBest
sortNew
sortRising
sortControversial
sortTop
)
var sorts = [...]string{
"hot",
"best",
"new",
"rising",
"controversial",
"top",
}
// GetHotLinks returns the hot links
// If no subreddit names are provided, then it runs the search against all those the client is subscribed to
// IMPORTANT: for subreddits, this will include the stickied posts (if any)