From 5221f82daa9bac0cbc3090f10f331ae112cd0242 Mon Sep 17 00:00:00 2001 From: Vartan Benohanian Date: Sun, 2 Aug 2020 15:32:01 -0400 Subject: [PATCH] Delete unused PrivateMessageService Signed-off-by: Vartan Benohanian --- private-messages.go | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 private-messages.go diff --git a/private-messages.go b/private-messages.go deleted file mode 100644 index 3799d39..0000000 --- a/private-messages.go +++ /dev/null @@ -1,35 +0,0 @@ -package reddit - -import ( - "context" - "net/http" - "net/url" -) - -// PrivateMessageService handles communication with the private message -// related methods of the Reddit API -type PrivateMessageService interface { - BlockUser(ctx context.Context, messageID string) (*Response, error) -} - -// PrivateMessageServiceOp implements the PrivateMessageService interface -type PrivateMessageServiceOp struct { - client *Client -} - -var _ PrivateMessageService = &PrivateMessageServiceOp{} - -// BlockUser blocks a user based on the ID of the private message -func (s *PrivateMessageServiceOp) BlockUser(ctx context.Context, messageID string) (*Response, error) { - path := "api/block" - - form := url.Values{} - form.Set("id", messageID) - - req, err := s.client.NewRequestWithForm(http.MethodPost, path, form) - if err != nil { - return nil, nil - } - - return s.client.Do(ctx, req, nil) -}