Revamp listing decoding, include after/before anchors in response
Now, instead of returning an object containing a list of results + the anchors, we return just the list. The anchors are available in the response object. Much cleaner this way in my opinion go-github and godo do it this way too. They include some meta information in the returned response objects Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
+1
-1
@@ -252,7 +252,7 @@ func (s *EmojiService) Upload(ctx context.Context, subreddit string, createReque
|
||||
|
||||
err = CheckResponse(httpResponse)
|
||||
if err != nil {
|
||||
return &Response{httpResponse}, err
|
||||
return newResponse(httpResponse), err
|
||||
}
|
||||
|
||||
return s.upload(ctx, subreddit, createRequest, fields["key"])
|
||||
|
||||
Reference in New Issue
Block a user