Use individual structs for services
Made it this way so that I can use the PostAndCommentService as a child of the PostService and CommentService. Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
+3
-1
@@ -12,7 +12,9 @@ import (
|
||||
// related methods of the Reddit API.
|
||||
//
|
||||
// Reddit API docs: https://www.reddit.com/dev/api/#section_listings
|
||||
type ListingsService service
|
||||
type ListingsService struct {
|
||||
client *Client
|
||||
}
|
||||
|
||||
// Get returns posts, comments, and subreddits from their IDs.
|
||||
func (s *ListingsService) Get(ctx context.Context, ids ...string) ([]*Post, []*Comment, []*Subreddit, *Response, error) {
|
||||
|
||||
Reference in New Issue
Block a user