Create Permalink type, tweak structs

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-06-27 13:06:38 -04:00
parent 7e3fdfca89
commit cad26daa3b
2 changed files with 48 additions and 15 deletions
+2
View File
@@ -75,6 +75,8 @@ func (s *ListingsServiceOp) GetPosts(ctx context.Context, ids ...string) ([]Post
}
// GetPost returns a post with its comments.
// The id here is the ID36 of the post, not its full id.
// Example: instead of t3_abc123, use abc123.
func (s *ListingsServiceOp) GetPost(ctx context.Context, id string) (*PostAndComments, *Response, error) {
path := fmt.Sprintf("comments/%s", id)
req, err := s.client.NewRequest(http.MethodGet, path, nil)